summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tap.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-09-19 10:28:44 +0000
committerphk <phk@FreeBSD.org>2000-09-19 10:28:44 +0000
commit6023f979709dc325fe614123710e7faa12ba79f9 (patch)
treec347201698c5958ef6e577c73bf7f710c905f8db /sys/net/if_tap.c
parentbc8d9c4814a55bf29cd2c010b5a0a58a79337d46 (diff)
downloadFreeBSD-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_tap.c')
-rw-r--r--sys/net/if_tap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index aad9101..6c88075 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -211,12 +211,12 @@ tapcreate(dev)
/* select device: tap or vmnet */
if (minor(dev) & VMNET_DEV_MASK) {
name = VMNET;
- unit = lminor(dev) & 0xff;
+ unit = dev2unit(dev) & 0xff;
tp->tap_flags |= TAP_VMNET;
}
else {
name = TAP;
- unit = lminor(dev);
+ unit = dev2unit(dev);
}
tp->tap_dev = make_dev(&tap_cdevsw, minor(dev), UID_ROOT, GID_WHEEL,
OpenPOWER on IntegriCloud