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/net/if_tun.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/net/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index da865f0..8079566 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -17,7 +17,6 @@ */ #include "opt_inet.h" -#include "opt_devfs.h" #include <sys/param.h> #include <sys/proc.h> @@ -51,11 +50,6 @@ #include <net/if_tunvar.h> #include <net/if_tun.h> -#ifdef DEVFS -#include <sys/eventhandler.h> -#include <fs/devfs/devfs.h> -#endif - static MALLOC_DEFINE(M_TUN, "tun", "Tunnel Interface"); static void tunattach __P((void *)); @@ -97,7 +91,6 @@ static struct cdevsw tun_cdevsw = { /* bmaj */ -1 }; -#ifdef DEVFS static void tun_clone __P((void *arg, char *name, int namelen, dev_t *dev)); static void @@ -111,26 +104,21 @@ tun_clone(arg, name, namelen, dev) if (*dev != NODEV) return; - if (devfs_stdclone(name, NULL, "tun", &u) != 1) + if (dev_stdclone(name, NULL, "tun", &u) != 1) return; /* XXX: minor encoding if u > 255 */ *dev = make_dev(&tun_cdevsw, u, UID_UUCP, GID_DIALER, 0600, "tun%d", u); } -#endif - static void tunattach(dummy) void *dummy; { -#ifdef DEVFS - EVENTHANDLER_REGISTER(devfs_clone, tun_clone, 0, 1000); -#else + EVENTHANDLER_REGISTER(dev_clone, tun_clone, 0, 1000); cdevsw_add(&tun_cdevsw); -#endif } static void |