summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-01-19 11:03:07 +0000
committerphk <phk@FreeBSD.org>2003-01-19 11:03:07 +0000
commit24596ddb76743273c5d39821727e4e00d025cb02 (patch)
treea1836e6e7bd999b9e7099048c5c2bd9535ef95cd /sys/kern/init_main.c
parent49b60b2ebe504ba8584d684a66b1351307a962cf (diff)
downloadFreeBSD-src-24596ddb76743273c5d39821727e4e00d025cb02.zip
FreeBSD-src-24596ddb76743273c5d39821727e4e00d025cb02.tar.gz
Originally when DEVFS was added, a global variable "devfs_present"
was used to control code which were conditional on DEVFS' precense since this avoided the need for large-scale source pollution with #include "opt_geom.h" Now that we approach making DEVFS standard, replace these tests with an #ifdef to facilitate mechanical removal once DEVFS becomes non-optional. No functional change by this commit.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 354536f..74424cc 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -554,21 +554,21 @@ start_init(void *dummy)
mac_create_root_mount(td->td_ucred, TAILQ_FIRST(&mountlist));
#endif
- if (devfs_present) {
- /*
- * For disk based systems, we probably cannot do this yet
- * since the fs will be read-only. But a NFS root
- * might be ok. It is worth a shot.
- */
- error = kern_mkdir(td, "/dev", UIO_SYSSPACE, 0700);
- if (error == EEXIST)
- error = 0;
- if (error == 0)
- error = kernel_vmount(0, "fstype", "devfs",
- "fspath", "/dev", NULL);
- if (error != 0)
- init_does_devfs = 1;
- }
+#ifndef NODEVFS
+ /*
+ * For disk based systems, we probably cannot do this yet
+ * since the fs will be read-only. But a NFS root
+ * might be ok. It is worth a shot.
+ */
+ error = kern_mkdir(td, "/dev", UIO_SYSSPACE, 0700);
+ if (error == EEXIST)
+ error = 0;
+ if (error == 0)
+ error = kernel_vmount(0, "fstype", "devfs",
+ "fspath", "/dev", NULL);
+ if (error != 0)
+ init_does_devfs = 1;
+#endif
/*
* Need just enough stack to hold the faked-up "execve()" arguments.
OpenPOWER on IntegriCloud