[BACK]Return to tty_43.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / compat / common

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/compat/common/tty_43.c between version 1.29 and 1.29.26.1

version 1.29, 2008/11/19 18:36:02 version 1.29.26.1, 2014/08/20 00:03:31
Line 118  ttcompat(struct tty *tp, u_long com, voi
Line 118  ttcompat(struct tty *tp, u_long com, voi
         switch (com) {          switch (com) {
         case TIOCGETP: {          case TIOCGETP: {
                 struct sgttyb *sg = (struct sgttyb *)data;                  struct sgttyb *sg = (struct sgttyb *)data;
                 u_char *cc;  
                 int speed;                  int speed;
   
                 mutex_spin_enter(&tty_lock);                  mutex_spin_enter(&tty_lock);
                 cc = tp->t_cc;  
                 speed = ttspeedtab(tp->t_ospeed, compatspeeds);                  speed = ttspeedtab(tp->t_ospeed, compatspeeds);
                 sg->sg_ospeed = (speed == -1) ? MAX_SPEED : speed;                  sg->sg_ospeed = (speed == -1) ? MAX_SPEED : speed;
                 if (tp->t_ispeed == 0)                  if (tp->t_ispeed == 0)
Line 131  ttcompat(struct tty *tp, u_long com, voi
Line 129  ttcompat(struct tty *tp, u_long com, voi
                         speed = ttspeedtab(tp->t_ispeed, compatspeeds);                          speed = ttspeedtab(tp->t_ispeed, compatspeeds);
                         sg->sg_ispeed = (speed == -1) ? MAX_SPEED : speed;                          sg->sg_ispeed = (speed == -1) ? MAX_SPEED : speed;
                 }                  }
                 sg->sg_erase = cc[VERASE];                  sg->sg_erase = tty_getctrlchar(tp, VERASE);
                 sg->sg_kill = cc[VKILL];                  sg->sg_kill = tty_getctrlchar(tp, VKILL);
                 sg->sg_flags = ttcompatgetflags(tp);                  sg->sg_flags = ttcompatgetflags(tp);
                 mutex_spin_exit(&tty_lock);                  mutex_spin_exit(&tty_lock);
                 break;                  break;
Line 165  ttcompat(struct tty *tp, u_long com, voi
Line 163  ttcompat(struct tty *tp, u_long com, voi
   
         case TIOCGETC: {          case TIOCGETC: {
                 struct tchars *tc = (struct tchars *)data;                  struct tchars *tc = (struct tchars *)data;
                 u_char *cc = tp->t_cc;  
   
                 tc->t_intrc = cc[VINTR];                  tc->t_intrc = tty_getctrlchar(tp, VINTR);
                 tc->t_quitc = cc[VQUIT];                  tc->t_quitc = tty_getctrlchar(tp, VQUIT);
                 tc->t_startc = cc[VSTART];                  tc->t_startc = tty_getctrlchar(tp, VSTART);
                 tc->t_stopc = cc[VSTOP];                  tc->t_stopc = tty_getctrlchar(tp, VSTOP);
                 tc->t_eofc = cc[VEOF];                  tc->t_eofc = tty_getctrlchar(tp, VEOF);
                 tc->t_brkc = cc[VEOL];                  tc->t_brkc = tty_getctrlchar(tp, VEOL);
                 break;                  break;
         }          }
         case TIOCSETC: {          case TIOCSETC: {
                 struct tchars *tc = (struct tchars *)data;                  struct tchars *tc = (struct tchars *)data;
                 u_char *cc = tp->t_cc;  
   
                 cc[VINTR] = tc->t_intrc;                  tty_setctrlchar(tp, VINTR, tc->t_intrc);
                 cc[VQUIT] = tc->t_quitc;                  tty_setctrlchar(tp, VQUIT, tc->t_quitc);
                 cc[VSTART] = tc->t_startc;                  tty_setctrlchar(tp, VSTART, tc->t_startc);
                 cc[VSTOP] = tc->t_stopc;                  tty_setctrlchar(tp, VSTOP, tc->t_stopc);
                 cc[VEOF] = tc->t_eofc;                  tty_setctrlchar(tp, VEOF, tc->t_eofc);
                 cc[VEOL] = tc->t_brkc;                  tty_setctrlchar(tp, VEOL, tc->t_brkc);
                 if (tc->t_brkc == (char)-1)                  if (tc->t_brkc == (char)-1)
                         cc[VEOL2] = _POSIX_VDISABLE;                          tty_setctrlchar(tp, VEOL2, _POSIX_VDISABLE);
                 break;                  break;
         }          }
         case TIOCSLTC: {          case TIOCSLTC: {
                 struct ltchars *ltc = (struct ltchars *)data;                  struct ltchars *ltc = (struct ltchars *)data;
                 u_char *cc = tp->t_cc;  
   
                 cc[VSUSP] = ltc->t_suspc;                  tty_setctrlchar(tp, VSUSP, ltc->t_suspc);
                 cc[VDSUSP] = ltc->t_dsuspc;                  tty_setctrlchar(tp, VDSUSP, ltc->t_dsuspc);
                 cc[VREPRINT] = ltc->t_rprntc;                  tty_setctrlchar(tp, VREPRINT, ltc->t_rprntc);
                 cc[VDISCARD] = ltc->t_flushc;                  tty_setctrlchar(tp, VDISCARD, ltc->t_flushc);
                 cc[VWERASE] = ltc->t_werasc;                  tty_setctrlchar(tp, VWERASE, ltc->t_werasc);
                 cc[VLNEXT] = ltc->t_lnextc;                  tty_setctrlchar(tp, VLNEXT, ltc->t_lnextc);
                 break;                  break;
         }          }
         case TIOCGLTC: {          case TIOCGLTC: {
                 struct ltchars *ltc = (struct ltchars *)data;                  struct ltchars *ltc = (struct ltchars *)data;
                 u_char *cc = tp->t_cc;  
   
                 ltc->t_suspc = cc[VSUSP];                  ltc->t_suspc = tty_getctrlchar(tp, VSUSP);
                 ltc->t_dsuspc = cc[VDSUSP];                  ltc->t_dsuspc = tty_getctrlchar(tp, VDSUSP);
                 ltc->t_rprntc = cc[VREPRINT];                  ltc->t_rprntc = tty_getctrlchar(tp, VREPRINT);
                 ltc->t_flushc = cc[VDISCARD];                  ltc->t_flushc = tty_getctrlchar(tp, VDISCARD);
                 ltc->t_werasc = cc[VWERASE];                  ltc->t_werasc = tty_getctrlchar(tp, VWERASE);
                 ltc->t_lnextc = cc[VLNEXT];                  ltc->t_lnextc = tty_getctrlchar(tp, VLNEXT);
                 break;                  break;
         }          }
         case TIOCLBIS:          case TIOCLBIS:

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.29.26.1

CVSweb <webmaster@jp.NetBSD.org>