Subject: Re: How minor numbers are allocated?
To: Mahadeva Swamy T L <Swamy@soc-soft.com>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 01/04/2004 13:12:50
Mahadeva Swamy T L wrote:
> Hi,
> 
> How the minor numbers are created in NetBSD for any driver?. which is
> the function which creates and links this to the device. Please let me
> know.
> 
> Regards
> Swamy
> Scanned by SecureSynergy VirusScreen Service. 
> For more information log on to : http://www.securesynergyonline.com or http://www.securesynergy.com

The major number is centrally allocated for the driver. For new drivers,
this is done in src/sys/conf/majors, for some the older drivers this
is done in MD files, in src/sys/arch/*/conf/majors.*.

The minor numbers are then fully in control of the driver, i.e.
the driver open/whatever routine has full responsibility to recognize
individual minor numbers and act accordingly. If you need to extend
existing device and want a new minor number, you can do that without
need to centrally assign the minor number.

Is this what you need to know?

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-