From owner-freebsd-arch Tue Feb 13 22: 2:50 2001 Delivered-To: freebsd-arch@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 74C4D37B4EC for ; Tue, 13 Feb 2001 22:02:46 -0800 (PST) Received: from zeppo.feral.com (IDENT:mjacob@zeppo [192.67.166.71]) by feral.com (8.9.3/8.9.3) with ESMTP id WAA11532; Tue, 13 Feb 2001 22:02:37 -0800 Date: Tue, 13 Feb 2001 22:02:36 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Poul-Henning Kamp Cc: arch@freebsd.org Subject: Re: now that DEVFS is standard.... In-Reply-To: <55329.982130096@critter> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message , Matthew > Jacob writes: > > > >....Can we now have wildcarded major numbers for creating devices? > > > >I mean, now that we have the name just appear each time you boot, the actual > >major number is not all that relevant now, is it? > > Weeeeeeell, devfs is default, but not mandatory so we still support > running !devfs systems, and unfortunately I suspect we will do so > for some time still. How about us having a 'range' of numbers, so we can do things like: static struct cdevsw sa_cdevsw = { /* open */ saopen, /* close */ saclose, /* read */ physread, /* write */ physwrite, /* ioctl */ saioctl, /* poll */ nopoll, /* mmap */ nommap, /* strategy */ sastrategy, /* name */ "sa", /* maj */ SA_CDEV_ANY, /* dump */ nodump, /* psize */ nopsize, /* flags */ D_TAPE, /* bmaj */ -1 }; or static struct cdevsw sa_cdevsw = { /* open */ saopen, /* close */ saclose, /* read */ physread, /* write */ physwrite, /* ioctl */ saioctl, /* poll */ nopoll, /* mmap */ nommap, /* strategy */ sastrategy, /* name */ "sa", /* maj */ SA_CDEV_MAJOR|SA_CDEV_ANY, /* dump */ nodump, /* psize */ nopsize, /* flags */ D_TAPE, /* bmaj */ -1 }; (make_dev gets SA_CDEV_MAJOR if !devfs, else any old number will do....) We went round and round and round with this at Sun. We ended up with the persistent file /etc/name_to_major which then binds a driver to a particular major. I've *never* liked it- so prone to porking. However, I like distributed, hemi-demi-asssigned, majors even less. Just some thoughts. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message