From b4fdd9becf8f55fafe3d1b6bbcf03c8b4273b5a3 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Tue, 16 Dec 2003 17:58:24 +0000 Subject: [PATCH] Once upon a time, DEVFS was optional, major numbers where static, and /dev needed to be statically populated with device nodes. The first two are no longer true, which makes the third pretty moot. In fact, we don't seem to put device node bits into the distribution archives at all anymore. So..... remove the god-aweful nasty hack that force unmounted devfs during installation so that static device nodes could land in /dev. Now that the vnode cleaner handles this case better this isn't strictly needed, but axeing code in sysinstall is almost always benficial. Thanks to Don Lewis for pointing out this attribute of sysinstall. --- usr.sbin/sysinstall/dist.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c index 6f5e31af8652..b28c3c63ede1 100644 --- a/usr.sbin/sysinstall/dist.c +++ b/usr.sbin/sysinstall/dist.c @@ -521,7 +521,7 @@ distExtractTarball(char *path, char *dist, char *my_dir, int is_base) { char *buf = NULL, fname[PATH_MAX]; struct timeval start, stop; - int i, j, status, total, intr, unmounted_dev; + int i, j, status, total, intr; int cpid, zpid, fd2, chunk, numchunks; properties dist_attr = NULL; const char *tmp; @@ -600,12 +600,6 @@ distExtractTarball(char *path, char *dist, char *my_dir, int is_base) total = 0; (void)gettimeofday(&start, (struct timezone *)NULL); - if (is_base && RunningAsInit && !Fake) { - unmounted_dev = 1; - unmount("/dev", MNT_FORCE); - } else - unmounted_dev = 0; - /* We have one or more chunks, initialize unpackers... */ mediaExtractDistBegin(root_bias(my_dir), &fd2, &zpid, &cpid); @@ -723,21 +717,6 @@ distExtractTarball(char *path, char *dist, char *my_dir, int is_base) else (void)mediaExtractDistEnd(zpid, cpid); - if (unmounted_dev) { - struct iovec iov[4]; - - iov[0].iov_base = "fstype"; - iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = "devfs"; - iov[1].iov_len = sizeof("devfs"); - iov[2].iov_base = "fspath"; - iov[2].iov_len = sizeof("fstype"); - iov[3].iov_base = "/dev"; - iov[3].iov_len = sizeof("/dev"); - (void)nmount(iov, 4, 0); - unmounted_dev = 0; - } - safe_free(buf); return (status); }