summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c16
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
OpenPOWER on IntegriCloud