From owner-svn-src-stable@freebsd.org Tue May 23 08:06:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E97D7A89F; Tue, 23 May 2017 08:06:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 676C31C6E; Tue, 23 May 2017 08:06:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N860XU095233; Tue, 23 May 2017 08:06:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N860X4095232; Tue, 23 May 2017 08:06:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230806.v4N860X4095232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318727 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:06:01 -0000 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;