diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-28 12:02:15 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-28 12:02:15 +0000 |
| commit | f9bb1cf0100fcbf2c05e69f6648d9bbd10196ddc (patch) | |
| tree | 8692648eebd3db41f9068a599363a0d97c102db0 /sys/kern | |
| parent | f5d7126306df13d7c863de6397c05faa185a549e (diff) | |
Notes
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/tty.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index f98a70fc2871..d8a76d9f9b07 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); |
