Subject: Re: major device number assignment
To: Quentin Garnier <cube@cubidou.net>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 10/16/2005 22:57:23
On Fri, Oct 14, 2005 at 07:56:25AM +0200, Quentin Garnier wrote:
> On Fri, Oct 14, 2005 at 03:33:15PM +1000, Simon Burge wrote:
> > john heasley wrote:
> > 
> > > I'd like to add twe to the alpha port.  Do I attempt to keep the major number
> > > the same as other ports, or just allocate the next available number?  sparc*
> > > & arm unnecessarily use different majors for twe.
> > 
> > I'm pretty sure that entries in sys/conf/majors can be overriden by
> > arch-specific entries, so just add it to the end of the former file
> > and it should effect any existing archs that use twe.
> 
> They're not overriden;  they just co-exist.  Both major numbers will be
> valid on archs that already provide a major number for that device.

Is that really the case? I thought a device can have at most one
major number assigned, and that it's not possible to assign different
major in sys/conf/majors and sys/arch/*/conf/majors.*. For example,
cdevsw_lookup_major() et.al. works with exactly one major.

Effectively once a device has a major assigned within arch-specific
for some arch, it must have arch-specific major also for any new
architecture, AFAIK.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We can walk our road together if our goals are all the same;     -=-
-=- We can run alone and free if we pursue a different aim.          -=-