summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_conf.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/kern_conf.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/kern_conf.c')
-rw-r--r--sys/kern/kern_conf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 6b04b45..0a98a34 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -62,7 +62,6 @@ static LIST_HEAD(, cdev) dev_free;
devfs_create_t *devfs_create_hook;
devfs_destroy_t *devfs_destroy_hook;
-int devfs_present;
static int ready_for_devs;
@@ -81,9 +80,11 @@ devsw(dev_t dev)
disk_dev_synth(dev);
if (dev->si_devsw)
return (dev->si_devsw);
- if (devfs_present)
- return (NULL);
+#ifndef NODEVFS
+ return (NULL);
+#else
return(cdevsw[major(dev)]);
+#endif
}
/*
OpenPOWER on IntegriCloud