- /*
- * Since we use the tty queues internally,
- * pty's can't be switched to disciplines which overwrite
- * the queues. We can't tell anything about the discipline
- * from here...
- *
- * Nb: this is not really good enough, the line disc open routine
- * may have done anything at all, no guarantees that close
- * will fix it. This also has the effect of losing the
- * previous discipline, which an error on a TIOCSETD shouldn't
- * do... Sometime it should be done via an explicit check
- * for TIOCSETD, then check to see what linesw[new_number].l_rint
- * really is.
- */
- if (linesw[tp->t_line].l_rint != ttyinput) {
- (*linesw[tp->t_line].l_close)(tp);
- tp->t_line = 0;
- (void)(*linesw[tp->t_line].l_open)(dev, tp, flag);
- error = ENOTTY;
- }