summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/tty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index f98a70f..d8a76d9 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1341,6 +1341,10 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td)
case FIONREAD:
*(int *)data = ttyinq_bytescanonicalized(&tp->t_inq);
return (0);
+ case FIONWRITE:
+ case TIOCOUTQ:
+ *(int *)data = ttyoutq_bytesused(&tp->t_outq);
+ return (0);
case FIOSETOWN:
if (tp->t_session != NULL && !tty_is_ctty(tp, td->td_proc))
/* Not allowed to set ownership. */
@@ -1603,9 +1607,6 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td)
case TIOCNXCL:
tp->t_flags &= ~TF_EXCLUDE;
return (0);
- case TIOCOUTQ:
- *(unsigned int *)data = ttyoutq_bytesused(&tp->t_outq);
- return (0);
case TIOCSTOP:
tp->t_flags |= TF_STOPPED;
ttydevsw_pktnotify(tp, TIOCPKT_STOP);
OpenPOWER on IntegriCloud