diff options
author | phk <phk@FreeBSD.org> | 2002-10-22 15:07:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-22 15:07:17 +0000 |
commit | 6bcf9ad3c5e18979edcbe3c1046b024a5cf81d90 (patch) | |
tree | c9a6286bf496e49a349c72a38669186127052bd7 | |
parent | 3ef2ff6c9db960f23d46e4141ff5c498bb830fdf (diff) | |
download | FreeBSD-src-6bcf9ad3c5e18979edcbe3c1046b024a5cf81d90.zip FreeBSD-src-6bcf9ad3c5e18979edcbe3c1046b024a5cf81d90.tar.gz |
Give a real error on failure to mount DEVFS.
-rw-r--r-- | usr.sbin/sade/install.c | 24 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 24 |
2 files changed, 10 insertions, 38 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index f1459dd..731ade0 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -914,7 +914,7 @@ installFixupXFree(dialogMenuItem *self) int installFilesystems(dialogMenuItem *self) { - int i, mountfailed; + int i; Disk *disk; Chunk *c1, *c2, *rootdev, *swapdev; Device **devs; @@ -1019,15 +1019,11 @@ installFilesystems(dialogMenuItem *self) iov[1].iov_len = strlen(iov[2].iov_base) + 1; iov[3].iov_base = "/mnt/dev"; iov[1].iov_len = strlen(iov[3].iov_base) + 1; - mountfailed = nmount(iov, 4, 0); - } + i = nmount(iov, 4, 0); - if (mountfailed) { - dialog_clear_norefresh(); - msgNotify("Copying initial device files.."); - /* Copy the boot floppy's dev files */ - if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio %s -pdum /mnt", cpioVerbosity())) { - msgConfirm("Couldn't clone the /dev files!"); + if (i) { + dialog_clear_norefresh(); + msgConfirm("Unable to mount DEVFS (error %d)", errno); return DITEM_FAILURE | DITEM_RESTORE; } } @@ -1044,16 +1040,6 @@ installFilesystems(dialogMenuItem *self) msgConfirm("No chunk list found for %s!", disk->name); return DITEM_FAILURE | DITEM_RESTORE; } - if (mountfailed) { - if (RunningAsInit && root && (root->newfs || upgrade)) { - Mkdir("/mnt/dev"); - if (!Fake) - MakeDevDisk(disk, "/mnt/dev"); - } - else if (!RunningAsInit && !Fake) - MakeDevDisk(disk, "/dev"); - } - for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index f1459dd..731ade0 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -914,7 +914,7 @@ installFixupXFree(dialogMenuItem *self) int installFilesystems(dialogMenuItem *self) { - int i, mountfailed; + int i; Disk *disk; Chunk *c1, *c2, *rootdev, *swapdev; Device **devs; @@ -1019,15 +1019,11 @@ installFilesystems(dialogMenuItem *self) iov[1].iov_len = strlen(iov[2].iov_base) + 1; iov[3].iov_base = "/mnt/dev"; iov[1].iov_len = strlen(iov[3].iov_base) + 1; - mountfailed = nmount(iov, 4, 0); - } + i = nmount(iov, 4, 0); - if (mountfailed) { - dialog_clear_norefresh(); - msgNotify("Copying initial device files.."); - /* Copy the boot floppy's dev files */ - if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio %s -pdum /mnt", cpioVerbosity())) { - msgConfirm("Couldn't clone the /dev files!"); + if (i) { + dialog_clear_norefresh(); + msgConfirm("Unable to mount DEVFS (error %d)", errno); return DITEM_FAILURE | DITEM_RESTORE; } } @@ -1044,16 +1040,6 @@ installFilesystems(dialogMenuItem *self) msgConfirm("No chunk list found for %s!", disk->name); return DITEM_FAILURE | DITEM_RESTORE; } - if (mountfailed) { - if (RunningAsInit && root && (root->newfs || upgrade)) { - Mkdir("/mnt/dev"); - if (!Fake) - MakeDevDisk(disk, "/mnt/dev"); - } - else if (!RunningAsInit && !Fake) - MakeDevDisk(disk, "/dev"); - } - for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { |