mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 05:04:50 +00:00
cdrom.c: try "cdrom/%s" then "cdrom/dists/%s"
dist.c: fix an error message to make more sense.
This commit is contained in:
parent
3df0e2af63
commit
e9f7e74946
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8807
|
@ -4,7 +4,7 @@
|
|||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: cdrom.c,v 1.2 1995/05/27 23:39:26 phk Exp $
|
||||
* $Id: cdrom.c,v 1.3 1995/05/28 03:04:46 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
|
@ -105,6 +105,9 @@ mediaGetCDROM(char *file)
|
|||
char buf[PATH_MAX];
|
||||
|
||||
snprintf(buf, PATH_MAX, "/cdrom/%s", file);
|
||||
if (!access(buf,R_OK))
|
||||
return open(buf, O_RDONLY);
|
||||
snprintf(buf, PATH_MAX, "/cdrom/dists/%s", file);
|
||||
return open(buf, O_RDONLY);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.27 1995/05/27 23:39:27 phk Exp $
|
||||
* $Id: dist.c,v 1.28 1995/05/28 03:04:49 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
|
@ -303,7 +303,7 @@ distExtract(char *parent, Distribution *me)
|
|||
snprintf(buf, 512, "%s%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
|
||||
fd = (*mediaDevice->get)(buf);
|
||||
if (fd < 0) {
|
||||
msgConfirm("FtpGet failed to retreive piece `%s' in the %s distribution!\nAborting the transfer", chunk, dist);
|
||||
msgConfirm("failed to retreive piece file %s!\nAborting the transfer", buf);
|
||||
goto punt;
|
||||
}
|
||||
while ((n = read(fd, buf, sizeof buf)) > 0) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: cdrom.c,v 1.2 1995/05/27 23:39:26 phk Exp $
|
||||
* $Id: cdrom.c,v 1.3 1995/05/28 03:04:46 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
|
@ -105,6 +105,9 @@ mediaGetCDROM(char *file)
|
|||
char buf[PATH_MAX];
|
||||
|
||||
snprintf(buf, PATH_MAX, "/cdrom/%s", file);
|
||||
if (!access(buf,R_OK))
|
||||
return open(buf, O_RDONLY);
|
||||
snprintf(buf, PATH_MAX, "/cdrom/dists/%s", file);
|
||||
return open(buf, O_RDONLY);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.27 1995/05/27 23:39:27 phk Exp $
|
||||
* $Id: dist.c,v 1.28 1995/05/28 03:04:49 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
|
@ -303,7 +303,7 @@ distExtract(char *parent, Distribution *me)
|
|||
snprintf(buf, 512, "%s%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
|
||||
fd = (*mediaDevice->get)(buf);
|
||||
if (fd < 0) {
|
||||
msgConfirm("FtpGet failed to retreive piece `%s' in the %s distribution!\nAborting the transfer", chunk, dist);
|
||||
msgConfirm("failed to retreive piece file %s!\nAborting the transfer", buf);
|
||||
goto punt;
|
||||
}
|
||||
while ((n = read(fd, buf, sizeof buf)) > 0) {
|
||||
|
|
Loading…
Reference in a new issue