- if (cmd == TIOCSETP)
- while (getc(&tp->t_outq) >= 0);
- }
- if (ttioctl(tp, cmd, addr, dev) == 0)
- u.u_error = ENOTTY;
- { int stop = (tp->t_un.t_chr.t_stopc == ('s'&037) &&
- tp->t_un.t_chr.t_startc == ('q'&037));
+ error = ttioctl(tp, cmd, data, dev);
+ if (error < 0)
+ error = ENOTTY;
+ { int stop = (tp->t_stopc == ('s'&037) &&
+ tp->t_startc == ('q'&037));