finding major number

news news at nic.NEAR.NET
Mon Dec 31 20:07:32 AEST 1990


    I'm in the process of writting a device driver for a serial port
under Mach 2.5.  In my attach routine I set up the line discipline's
tty structure for each port I find.  Part of the struct tty is the
device number (t_dev) which I initialize as tp->t_dev = makedev(4, i).
My question is, is this the correct way -- hardcoding the major
number?  Or is their an include file (possibly generated be config?)
that maps major numbers?  Under IRIX (system V) there is major.h for
this purpose.

Thank's in advance.
Steve Chappelow           EMBA Computer Facility, University of Vermont
(swc at uvm.edu || uunet!uvm-gen!swc)                        (802)656-2926
"Use the right tool for the job and stop worrying about code optimization!"
     ---Doug Gwyn



More information about the Comp.unix.internals mailing list