home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / sysv386 / 12420 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.4 KB  |  43 lines

  1. Newsgroups: comp.unix.sysv386
  2. Path: sparky!uunet!darwin.sura.net!jvnc.net!mtcusa
  3. From: mtcusa@tigger.jvnc.net (Multilingual Technogies Corporation)
  4. Subject: INTERACTIVE Unix and Sun River Terminals
  5. Message-ID: <1992Jul25.120758.10748@tigger.jvnc.net>
  6. Originator: mtcusa@tigger.jvnc.net
  7. Sender: news@tigger.jvnc.net (Zee News Genie)
  8. Nntp-Posting-Host: tigger.jvnc.net
  9. Organization: JvNCnet, Princeton University, NJ
  10. Distribution: usa
  11. Date: Sat, 25 Jul 1992 12:07:58 GMT
  12. Lines: 29
  13.  
  14. HI:
  15.  
  16. I am inside the ioctl call of an INTERACTIVE Unix driver, and need to find
  17. out the current 'struct tty *tp' pointer of the current user.  This is
  18. not a line discipline ioctl, so I don't really get the tp passed to me.
  19.  
  20. Normally I could do:
  21.  
  22.     tp = &cdevsw[major(dev)].d_ttys[minor(dev)];
  23.  
  24. from a serial line login, or 
  25.  
  26.     if( ! strcmp( cdevsw[major(dev)].d_name, "kd" ) )
  27.         tp = kd_state[VTINDEX(dev)]->tp;
  28.  
  29. for a virtual terminal.
  30.  
  31. The problem is now I have to find it from a Sun River Terminal.
  32. These are external VGA consoles.  They also provide a virtual terminal
  33. capability, but seem to have put the 'tp' pointer somewhere else.
  34.  
  35. I haven't tried their SUNINDEX() macro yet (I think that's the name)
  36. because I'm not sure that will index into the 'kd_state' table.
  37. I suppose I could start stepping thru the kernel debugger, but that turns
  38. my stomach; as does just hacking thru endless panics.
  39.  
  40. Any suggestions?
  41.  
  42. George Bogatko - mtcusa@tigger.jvnc.net
  43.