summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-02-02 03:32:25 +0000
committerbrian <brian@FreeBSD.org>2001-02-02 03:32:25 +0000
commit5dfebcc02e3145f96743725b0cb27702796d50fd (patch)
tree684ee966c3b6764b38dbfee4669a4af859d27c32 /sys/net
parent410082716c1748496cbaedaad5559d16c0882823 (diff)
downloadFreeBSD-src-5dfebcc02e3145f96743725b0cb27702796d50fd.zip
FreeBSD-src-5dfebcc02e3145f96743725b0cb27702796d50fd.tar.gz
Pass the minor number rather than the unit number to make_dev()
from the clone handler.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_tap.c4
-rw-r--r--sys/net/if_tun.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 2848749..5d7ce75 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -221,10 +221,10 @@ tapclone(arg, name, namelen, dev)
if (dev_stdclone(name, NULL, device_name, &unit) != 1)
return;
- minor = (unit | VMNET_DEV_MASK);
+ minor = unit2minor(unit | VMNET_DEV_MASK);
}
else
- minor = unit;
+ minor = unit2minor(unit);
*dev = make_dev(&tap_cdevsw, minor, UID_ROOT, GID_WHEEL, 0600, "%s%d",
device_name, unit);
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index feef9c9..c804ad3 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -105,8 +105,7 @@ tun_clone(arg, name, namelen, dev)
return;
if (dev_stdclone(name, NULL, "tun", &u) != 1)
return;
- /* XXX: minor encoding if u > 255 */
- *dev = make_dev(&tun_cdevsw, u,
+ *dev = make_dev(&tun_cdevsw, unit2minor(u),
UID_UUCP, GID_DIALER, 0600, "tun%d", u);
}
OpenPOWER on IntegriCloud