From owner-freebsd-hackers Thu Jan 30 17:44:02 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA20277 for hackers-outgoing; Thu, 30 Jan 1997 17:44:02 -0800 (PST) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA20257 for ; Thu, 30 Jan 1997 17:43:56 -0800 (PST) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.8.5/8.8.4) with SMTP id RAA06454; Thu, 30 Jan 1997 17:40:21 -0800 (PST) Message-ID: <32F14D23.1CFBAE39@whistle.com> Date: Thu, 30 Jan 1997 17:38:43 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Joerg Wunsch CC: FreeBSD hackers , "Brian J. McGovern" Subject: Re: Device Drivers 101 References: <199701300505.AAA09649@spoon.beta.com> <199701300601.QAA27658@genesis.atrad.adelaide.edu.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)