diff options
author | Ed Schouten <ed@FreeBSD.org> | 2008-09-26 14:19:52 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2008-09-26 14:19:52 +0000 |
commit | d3ce8327194c0bcf742f2e03b5b0dc8f8cfe7f6b (patch) | |
tree | f45f750affeffb39e162226343b0db9a110c42ce /sys/kern/kern_conf.c | |
parent | ed0c85e09423e29414f0693dfc22ec1f98d0e194 (diff) | |
download | src-d3ce8327194c0bcf742f2e03b5b0dc8f8cfe7f6b.tar.gz src-d3ce8327194c0bcf742f2e03b5b0dc8f8cfe7f6b.zip |
Remove unit2minor() use from kernel code.
When I changed kern_conf.c three months ago I made device unit numbers
equal to (unneeded) device minor numbers. We used to require
bitshifting, because there were eight bits in the middle that were
reserved for a device major number. Not very long after I turned
dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
The unit2minor() and minor2unit() macro's were no-ops.
We'd better not remove these four macro's from the kernel, because there
is a lot of (external) code that may still depend on them. For now it's
harmless to remove all invocations of unit2minor() and minor2unit().
Reviewed by: kib
Notes
Notes:
svn path=/head/; revision=183381
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 409652f75310..c276c8783527 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -1017,7 +1017,7 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, struct cdev ** } if (unit == -1) unit = low & CLONE_UNITMASK; - dev = newdev(csw, unit2minor(unit | extra), ndev); + dev = newdev(csw, unit | extra, ndev); if (dev->si_flags & SI_CLONELIST) { printf("dev %p (%s) is on clonelist\n", dev, dev->si_name); printf("unit=%d, low=%d, extra=0x%x\n", unit, low, extra); |