Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site bbncca.ARPA Path: utzoo!watmath!clyde!akgua!mcnc!decvax!bbncca!sdyer From: sdyer@bbncca.ARPA (Steve Dyer) Newsgroups: net.unix-wizards Subject: Re: Minor device numbers: too small! Message-ID: <649@bbncca.ARPA> Date: Sat, 31-Mar-84 12:57:42 EST Article-I.D.: bbncca.649 Posted: Sat Mar 31 12:57:42 1984 Date-Received: Sun, 1-Apr-84 08:15:38 EST References: <1096@proper.UUCP> Organization: Bolt, Beranek and Newman, Cambridge, Ma. Lines: 18 Keywords: minor device number,terminals,future Unix releases 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@bbncca.ARPA