home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / ultrix / 8328 < prev    next >
Encoding:
Text File  |  1992-11-15  |  2.0 KB  |  43 lines

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