Device minor number uniqueness
Poul-Henning Kamp
phk at phk.freebsd.dk
Sun Feb 17 13:33:44 PST 2008
In message <20080217212457.GX1340 at hoeg.nl>, Ed Schouten writes:
>After digging into some more source code, it turns out a lot of drivers
>use minor number to store device numbers and such, but there is no real
>reason why we should enforce drivers to use unique minor numbers.
the major & minor together combine to the userland concept of a
"dev_t" which conforms to POSIX.
While I don't think POSIX demands that dev_t has to be unique per
device, the amount of software that assumes them to be is not to
be sneezed at.
If you just need a minor number to fill out the field, use the
unit number allocation functions.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-arch
mailing list