Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Nov 2009 23:37:38 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Ed Schouten <ed@80386.nl>
Cc:        Kostik Belousov <kostikbel@gmail.com>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer <brueffer@freebsd.org>
Subject:   Re: svn commit: r198768 - head/sbin/mknod
Message-ID:  <86tyxdj2h9.fsf@ds4.des.no>
In-Reply-To: <20091101220533.GL1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 23:05:33 %2B0100")
References:  <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> <86y6mpj4fs.fsf@ds4.des.no> <20091101220533.GL1293@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Ed Schouten <ed@80386.nl> writes:
> > Dag-Erling Sm=C3=B8rgrav <des@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
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tyxdj2h9.fsf>