From 6023f979709dc325fe614123710e7faa12ba79f9 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 19 Sep 2000 10:28:44 +0000 Subject: Rename lminor() to dev2unit(). This function gives a linear unit number which hides the 'hole' in the minor bits. Introduce unit2minor() to do the reverse operation. Fix some some make_dev() calls which didn't use UID_* or GID_* macros. Kill the v_hashchain alias macro, it hides the real relationship. Introduce experimental SI_CHEAPCLONE flag set it on cloned bpfs. --- sys/net/if_tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net/if_tun.c') diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 8079566..4b47ec6 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -129,14 +129,14 @@ tuncreate(dev) struct ifnet *ifp; dev = make_dev(&tun_cdevsw, minor(dev), - UID_UUCP, GID_DIALER, 0600, "tun%d", lminor(dev)); + UID_UUCP, GID_DIALER, 0600, "tun%d", dev2unit(dev)); MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_WAITOK); bzero(sc, sizeof *sc); sc->tun_flags = TUN_INITED; ifp = &sc->tun_if; - ifp->if_unit = lminor(dev); + ifp->if_unit = dev2unit(dev); ifp->if_name = "tun"; ifp->if_mtu = TUNMTU; ifp->if_ioctl = tunifioctl; -- cgit v1.1