Pass the minor number rather than the unit number to make_dev()
from the clone handler.
This commit is contained in:
parent
115867175a
commit
d38cfdcb8c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71921
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user