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/dev/ccd/ccd.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/dev/ccd/ccd.c')
-rw-r--r-- | sys/dev/ccd/ccd.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index 0dd13fb..7b06a89 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -87,7 +87,6 @@ * Moffett Field, CA 94035 */ -#include "opt_devfs.h" #include "ccd.h" #include <sys/param.h> @@ -109,11 +108,6 @@ #include <sys/ccdvar.h> -#ifdef DEVFS -#include <sys/eventhandler.h> -#include <fs/devfs/devfs.h> -#endif - #if defined(CCDDEBUG) && !defined(DEBUG) #define DEBUG #endif @@ -289,7 +283,6 @@ putccdbuf(struct ccdbuf *cbp) #define CCD_OFFSET 16 #endif -#ifdef DEVFS static void ccd_clone(void *arg, char *name, int namelen, dev_t *dev) { @@ -298,7 +291,7 @@ ccd_clone(void *arg, char *name, int namelen, dev_t *dev) if (*dev != NODEV) return; - i = devfs_stdclone(name, &s, "ccd", &u); + i = dev_stdclone(name, &s, "ccd", &u); if (i != 2) return; if (u >= numccd) @@ -310,7 +303,6 @@ ccd_clone(void *arg, char *name, int namelen, dev_t *dev) *dev = make_dev(&ccd_cdevsw, u * 8 + *s - 'a', UID_ROOT, GID_OPERATOR, 0640, name); } -#endif DEVFS /* * Called by main() during pseudo-device attachment. All we need @@ -348,9 +340,7 @@ ccdattach() /* XXX: is this necessary? */ for (i = 0; i < numccd; ++i) ccddevs[i].ccd_dk = -1; -#ifdef DEVFS - EVENTHANDLER_REGISTER(devfs_clone, ccd_clone, 0, 1000); -#endif + EVENTHANDLER_REGISTER(dev_clone, ccd_clone, 0, 1000); } static int |