diff options
author | phk <phk@FreeBSD.org> | 2000-09-02 19:17:34 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-09-02 19:17:34 +0000 |
commit | e47f61e18396b6e5f61ee91b9f9f832976ee96cf (patch) | |
tree | bc17f23dc3fa3b9663516bac048049a5f02652ea /sys/kern/subr_disk.c | |
parent | 0ab175f21b9e105fcbe4db6569019e946f23e13c (diff) | |
download | FreeBSD-src-e47f61e18396b6e5f61ee91b9f9f832976ee96cf.zip FreeBSD-src-e47f61e18396b6e5f61ee91b9f9f832976ee96cf.tar.gz |
Avoid the modules madness I inadvertently introduced by making the
cloning infrastructure standard in kern_conf. Modules are now
the same with or without devfs support.
If you need to detect if devfs is present, in modules or elsewhere,
check the integer variable "devfs_present".
This happily removes an ugly hack from kern/vfs_conf.c.
This forces a rename of the eventhandler and the standard clone
helper function.
Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include
like <sys/queue.h>
Remove all #includes of opt_devfs.h they no longer matter.
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 77fc4ee..325038c 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -10,8 +10,6 @@ * */ -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -22,12 +20,7 @@ #include <sys/malloc.h> #include <sys/sysctl.h> #include <machine/md_var.h> - -#ifdef DEVFS -#include <sys/eventhandler.h> -#include <fs/devfs/devfs.h> #include <sys/ctype.h> -#endif MALLOC_DEFINE(M_DISK, "disk", "disk data"); @@ -39,7 +32,6 @@ static d_psize_t diskpsize; static LIST_HEAD(, disk) disklist = LIST_HEAD_INITIALIZER(&disklist); -#ifdef DEVFS static void disk_clone(void *arg, char *name, int namelen, dev_t *dev) { @@ -95,7 +87,6 @@ disk_clone(void *arg, char *name, int namelen, dev_t *dev) return; } } -#endif static void inherit_raw(dev_t pdev, dev_t dev) @@ -138,9 +129,7 @@ disk_create(int unit, struct disk *dp, int flags, struct cdevsw *cdevsw, struct dp->d_devsw = cdevsw; LIST_INSERT_HEAD(&disklist, dp, d_list); if (!once) { -#ifdef DEVFS - EVENTHANDLER_REGISTER(devfs_clone, disk_clone, 0, 1000); -#endif + EVENTHANDLER_REGISTER(dev_clone, disk_clone, 0, 1000); once++; } return (dev); |