home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.iastate.edu!john
- From: john@iastate.edu (John Hascall)
- Subject: Re: CD-ROM is really a pseudoterminal??
- Message-ID: <BxrvG2.J5t@news.iastate.edu>
- Keywords: Gak! Ugh! Pfui!
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames, IA
- References: <5435@daily-planet.concordia.ca> <1992Nov12.101538.6058@dcs.warwick.ac.uk> <BxMC7E.D3o@newsflash.concordia.ca>
- Date: Sun, 15 Nov 1992 19:28:50 GMT
- Lines: 30
-
- smw@alcor.concordia.ca ( Steven Winikoff ) writes:
- }rince@dcs.warwick.ac.uk (James Bonfield) writes:
- }>smw@alcor.concordia.ca ( Steven Winikoff ) writes:
- }> > crw-rw-rw- 1 root system 21, 42 Nov 11 17:28 /dev/ptyra
- }> > brw------- 1 root system 21, 42 Jun 9 17:45 /dev/rz5c
- }> > WHAT'S GOING ON HERE?
- }> Things are the same on the system I use - however, note that ptyra is a
- }> character device and rz5c is a block device. My guess is that the two do not
- }> cause any conflicts. Is this right?
- }I did notice that one is a block device and one is a character device.
- }However, pff obviously thinks they're equivalent. Also, while I'm definitely
- }no kernel hacker, I *thought* I understood that the major and minor numbers
- }are all that the kernel actually uses to identify a device. Aren't these
- }numbers used to index a table of pointers to device driver routines?
-
- Close. There *are* two such tables "bdevsw[]" and "cdevsw[]" (block/char
- device switch) which are indexed by the "major" device number only.
- The "minor" number is generally passed to the routine extracted from the
- table. For example:
-
- error = (*cdevsw[major(u.u_ttyd)].d_ioctl)(u.u_ttyd, cmd, addr, flag);
-
- If this "pff" thing thinks they are the same, it is brain-damaged.
-
- John
- --
- John Hascall ``An ill-chosen word is the fool's messenger.''
- Systems Software Engineer
- Project Vincent
- Iowa State University Computation Center + Ames, IA 50011 + 515/294-9551
-