Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!ogicse!mintaka!nuhub!nic!news From: news@nic.NEAR.NET (news) Newsgroups: comp.unix.internals Subject: finding major number Message-ID: <31.Dec.90.090732.20@uvm.edu> Date: 31 Dec 90 09:07:32 GMT Organization: Mach Systems Group, EMBA-CF, Univ. of Vermont Lines: 15 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@uvm.edu || uunet!uvm-gen!swc) (802)656-2926 "Use the right tool for the job and stop worrying about code optimization!" ---Doug Gwyn