diff options
author | phk <phk@FreeBSD.org> | 2000-09-19 10:28:44 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-09-19 10:28:44 +0000 |
commit | 6023f979709dc325fe614123710e7faa12ba79f9 (patch) | |
tree | c347201698c5958ef6e577c73bf7f710c905f8db /sys/net/if_tun.c | |
parent | bc8d9c4814a55bf29cd2c010b5a0a58a79337d46 (diff) | |
download | FreeBSD-src-6023f979709dc325fe614123710e7faa12ba79f9.zip FreeBSD-src-6023f979709dc325fe614123710e7faa12ba79f9.tar.gz |
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.
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |