diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-05-08 08:34:50 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-05-08 08:34:50 +0000 |
| commit | 048fd859cea8ecd2aca85200fbf47a99fb3cc8e0 (patch) | |
| tree | 086de18a31d4a875f8655b2fce5144a08634e274 | |
| parent | 136227630318207dcc355cb23468d07db01b2538 (diff) | |
Notes
| -rw-r--r-- | usr.bin/resizewin/resizewin.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/resizewin/resizewin.c b/usr.bin/resizewin/resizewin.c index 6ab2778caaa4..566577be4d70 100644 --- a/usr.bin/resizewin/resizewin.c +++ b/usr.bin/resizewin/resizewin.c @@ -52,7 +52,7 @@ main(__unused int argc, __unused char **argv) { struct termios old, new; struct winsize w; - int ret, fd, cnt, error, what; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; @@ -72,10 +72,9 @@ main(__unused int argc, __unused char **argv) exit(1); /* Discard input received so far */ - what = FREAD | FWRITE; - error = ioctl(fd, TIOCFLUSH, &what); + error = tcflush(fd, TCIOFLUSH); if (error != 0) - warn("ioctl"); + warn("tcflush"); if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; |
