svn commit: r198768 - head/sbin/mknod
Dag-Erling Smørgrav
des at des.no
Sun Nov 1 22:37:39 UTC 2009
Ed Schouten <ed at 80386.nl> writes:
> > Dag-Erling Smørgrav <des at des.no> writes:
> > identified an individual device handled by that driver. FreeBSD no
> > longer makes that distinction; each device has a unique system-wide
> > minor number, and the major number is always zero. However, the
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> As pointed out earlier, this is not true. Major numbers can be non-zero.
>
> | #define major(x) ((int)(((u_int)(x) >> 8)&0xff))
>
> Devices 256-511 will have a major number of 1, etc.
So:
Each device has a unique system-wide device number; the minor number
contains the eight least-significant bits, and the major number
contains the rest.
(device numbers are currently unsigned int; is there a reason not to
make them explicitly 32 bits wide, i.e. uint32_t?)
> Apart from that, I think there is also a fair amount of overlap with the
> COMPATIBILITY section of the same manpage.
Yeah, but who reads those? :)
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the svn-src-all
mailing list