cvs commit: src/sys/dev/ieee488 upd7210.c src/sys/dev/led led.c
src/sys/dev/md md.c src/sys/geom geom_dev.c src/sys/kern
kern_conf.c src/sys/sys conf.h
ed at FreeBSD.org
Thu May 29 12:50:46 UTC 2008
ed 2008-05-29 12:50:46 UTC
FreeBSD src repository
Remove the distinction between device minor and unit numbers.
Even though we got rid of device major numbers some time ago, device
drivers still need to provide unique device minor numbers to make_dev().
These numbers are only used inside the kernel. They are not related to
device major and minor numbers which are visible in devfs. These are
actually based on the inode number of the device.
It would eventually be nice to remove minor numbers entirely, but we
don't want to be too agressive here.
Because the 8-15 bits of the device number field (si_drv0) are still
reserved for the major number, there is no 1:1 mapping of the device
minor and unit numbers. Because this is now unused, remove the
restrictions on these numbers.
The MAXMAJOR definition was actually used for two purposes. It was used
to convert both the userspace and kernelspace device numbers to their
major/minor pair, which is why it is now named UMINORMASK.
minor2unit() and unit2minor() have now become useless. Both minor() and
dev2unit() now serve the same purpose. We should eventually remove some
of them, at least turning them into macro's. If devfs would become
completely minor number unaware, we could consider using si_drv0 directly,
just like si_drv1 and si_drv2.
Approved by: philip (mentor)
Revision Changes Path
1.11 +1 -1 src/sys/dev/ieee488/upd7210.c
1.18 +2 -1 src/sys/dev/led/led.c
1.175 +2 -1 src/sys/dev/md/md.c
1.97 +1 -1 src/sys/geom/geom_dev.c
1.215 +8 -11 src/sys/kern/kern_conf.c
1.239 +0 -2 src/sys/sys/conf.h
More information about the cvs-all