Author: trasz
Date: Tue May 23 08:06:00 2017
New Revision: 318727
URL: https://svnweb.freebsd.org/changeset/base/318727

Log:
  MFC r317933:
  
  Use tcflush(3) instead of (nonstandard) TIOCFLUSH.

Modified:
  stable/11/usr.bin/resizewin/resizewin.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/resizewin/resizewin.c
==============================================================================
--- stable/11/usr.bin/resizewin/resizewin.c     Tue May 23 08:04:36 2017        
(r318726)
+++ stable/11/usr.bin/resizewin/resizewin.c     Tue May 23 08:06:00 2017        
(r318727)
@@ -52,7 +52,7 @@ main(__unused int argc, __unused char **
 {
        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 **
                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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to