diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-01-01 14:29:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-01-01 14:29:18 +0000 |
commit | 9ee979167a433fe8a0fb76735cd220a37ee994f2 (patch) | |
tree | 44e87e785346d65b21f7715d49a501a16003e17b | |
parent | a775107f5f346e66e92652fb2cbfabebe83de570 (diff) | |
download | rtmux-9ee979167a433fe8a0fb76735cd220a37ee994f2.tar.gz rtmux-9ee979167a433fe8a0fb76735cd220a37ee994f2.tar.bz2 rtmux-9ee979167a433fe8a0fb76735cd220a37ee994f2.zip |
Use tcflush(3) instead of TIOCFLUSH, from Ed Schouten.
-rw-r--r-- | tty.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -146,7 +146,7 @@ void tty_start_tty(struct tty *tty) { struct termios tio; - int what, mode; + int mode; if (tty->fd == -1) return; @@ -170,10 +170,7 @@ tty_start_tty(struct tty *tty) tio.c_cc[VTIME] = 0; if (tcsetattr(tty->fd, TCSANOW, &tio) != 0) fatal("tcsetattr failed"); - - what = 0; - if (ioctl(tty->fd, TIOCFLUSH, &what) != 0) - fatal("ioctl(TIOCFLUSH)"); + tcflush(tty->fd, TCIOFLUSH); tty_putcode(tty, TTYC_SMCUP); |