Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 1997 17:38:43 -0800
From:      Julian Elischer <julian@whistle.com>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        FreeBSD hackers <freebsd-hackers@freebsd.org>, "Brian J. McGovern" <mcgovern@spoon.beta.com>
Subject:   Re: Device Drivers 101
Message-ID:  <32F14D23.1CFBAE39@whistle.com>
References:  <199701300505.AAA09649@spoon.beta.com> <199701300601.QAA27658@genesis.atrad.adelaide.edu.au> <Mutt.19970130222807.j@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
J Wunsch wrote:
> 
> As Michael Smith wrote:
> 
> > Devfs doesn't really 'do' major and minor numbers; there's a logically
> > direct translation from the named node to your switch entry and the
> > unit number you supply when you create the node.
> 
> Though, it's a very good idea to leave the major number assignment to
> devfs.  The existing drivers don't do this yet, but i think once devfs
> is really up for the masses, we should walk through the tree and avoid
> hard allocations wherever possible.  (I.e., almost everything except
> those devices the bootstrap code has builtin knowlege about.)
> 
> I think you can achieve automatic major number assignment by passing
> -1 down to devfs.  Julian might comment on this.

No you pass -1 to cdevsw_add amd bdevsw_add
then see what they allocated you and pass that to devfs when
you set up the devices in devfs.

> 
> --
> cheers, J"org
> 
> joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32F14D23.1CFBAE39>