Subject: Re: Port independent cdevsw
To: None <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 10/15/2000 13:37:39
[ On Sunday, October 15, 2000 at 18:03:33 (+0200), Lennart Augustsson wrote: ]
> Subject: Port independent cdevsw
> Why do we have a cdevsw and bdevsw for each port? Purely historical
> reasons I'd say. It's a real nuisance. Whenever you add a MI device
> driver you have to change far to many places. You need to update the
> conf.c file for all ports that can have the device, and then the MAKEDEV
> for the corresponding ports. This is annoying and error prone.
IIRC it's because ports try to keep major/minor compatible with the
original vendor-supplied OS for that platform....
> I suggest that we switch over to having a mostly port independent [bc]devsw
> tables. There is still a need to have port specific drivers so I suggest the
> following design:
> Set aside a part of the major device numbers for port specific driver,
> say 0-255. The table for this will be port specific.
> The rest of the major numbers are port independent and stored in a
> central table.
Much better would be if config(8) allocated the actual slot numbers from
a common table -- hand-hacking *devsw entries is really bogus! That
common table could then driver MAKEDEV and all would be one!
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>