home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / bsd / 4063 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  2.0 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!veritas!amdcad!BitBlocks.com!bvs
  2. From: bvs@BitBlocks.com (Bakul Shah)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: com woes
  5. Message-ID: <1992Aug12.210501.17721@BitBlocks.com>
  6. Date: 12 Aug 92 21:05:01 GMT
  7. References: <1992Aug9.085755.6237@news.tu-graz.ac.at>
  8. Organization: Bit Blocks, Inc.
  9. Lines: 33
  10.  
  11. chmr@fstgds01.tu-graz.ac.at (Christoph Robitschko) writes:
  12.  
  13. >I had the problem with select() not working on com ports. I got no
  14. >response from a post regarding this one, so I started to look into it 
  15. >myself. I found out that the com driver calculates unit = minor(dev) -1;
  16. >This has the following implications:
  17. >    /dev/com1 corresponds to COM0, /dev/com2 to COM1 (very confusing
  18. >        in kernel messages)
  19. >    It is incompatible with the config file entries com1 at..., com2 at...
  20. >    Unpredictible results will occur if someone puts a com0 at.. in
  21. >        his config file.
  22. >    It is incompatible with the DOS usage of COM1, COM2 (But who cares 8-)
  23. >    ttselect() calculates unit = minor(dev), and uses this as an index in
  24. >        com_tty. Because this index is different from that used
  25. >        in the com driver, select() on /dev/com1 looks at
  26. >        /dev/com2 and select() on /dev/com2 looks at an undefined
  27. >        entry in com_tty and returns always true.
  28.  
  29. Aha!  This explains why when the mouse on COM2 the X server hogs
  30. the machine, and, why when the mouse is on COM1 its moves and
  31. button presses are accepted only after hitting a key or some
  32. activity on COM2.  Thanks for the patch!  The mouse and the X
  33. server behave much better now (mouse button presses are still not
  34. recognized right away but that has something to do with x386Io.c
  35. -- I'll probably implement either a `mouse' line discipline or
  36. /dev/mouse, with ioctls to set mouse type etc, so that non X
  37. programs can also make use of mice).
  38.  
  39. I have also switched over to using /dev/com0 & /dev/com1 instead
  40. of /dev/com1 & /dev/com2 (with appropriate changes in the
  41. /sys/i386/conf/<HOST> and MAKEDEV files).
  42.  
  43. -- bakul shah <bvs@bitblocks.com>
  44.