Minor device numbers: too small!

sdyer at bbncca.UUCP sdyer at bbncca.UUCP
Sun Apr 1 03:57:42 AEST 1984


Though I cannot yet conceive of needing more than 256 minor device
numbers, it should be relatively easy for anyone with source code
or the ability to link a new kernel with customized new device drivers
to have more than 256 devices of a particular class (e.g. ttys.)

Rather than using a single major device number to specify a device class,
simply use *several*, and you'll get 256 for each major device you claim.
That is, duplicate the cdevsw[] entries for each major device number.  Now,
the only issue is how to resolve an individual device data structure (such
as a particular "struct tty") given both a major and minor device number.
Most drivers merely used the minor device number as an index into an array.
Here, you'll have to be a bit more careful, but it shouldn't be hard.

How long will it be before we hear: "User ID numbers: too small!"
-- 
/Steve Dyer
{decvax,linus,ima}!bbncca!sdyer
sdyer at bbncca.ARPA



More information about the Comp.unix.wizards mailing list