From owner-svn-src-all@freebsd.org Mon Dec 25 19:49:09 2017 Return-Path: Delivered-To: svn-src-all@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 C979BEA2C4C; Mon, 25 Dec 2017 19:49:09 +0000 (UTC) (envelope-from eadler@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 9643D70803; Mon, 25 Dec 2017 19:49:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBPJn55Y054360; Mon, 25 Dec 2017 19:49:05 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBPJn5bQ054359; Mon, 25 Dec 2017 19:49:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712251949.vBPJn5bQ054359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 25 Dec 2017 19:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327181 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 327181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 19:49:09 -0000 Author: eadler Date: Mon Dec 25 19:49:05 2017 New Revision: 327181 URL: https://svnweb.freebsd.org/changeset/base/327181 Log: fsync(3): correctly document return values In r268924 the behavior of fflush was changed to return success on read only streams. Document this. Reported by: zrj@DragonFlyBSD.org Modified: head/lib/libc/stdio/fflush.3 Modified: head/lib/libc/stdio/fflush.3 ============================================================================== --- head/lib/libc/stdio/fflush.3 Mon Dec 25 19:42:04 2017 (r327180) +++ head/lib/libc/stdio/fflush.3 Mon Dec 25 19:49:05 2017 (r327181) @@ -32,7 +32,7 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd December 25, 2017 .Dt FFLUSH 3 .Os .Sh NAME @@ -87,9 +87,7 @@ is set to indicate the error. The .Fa stream argument -is not an open stream, or, in the case of -.Fn fflush , -not a stream open for writing. +is not an open stream. .El .Pp The function @@ -97,7 +95,12 @@ The function may also fail and set .Va errno for any of the errors specified for the routine -.Xr write 2 . +.Xr write 2 , +except that in case of +.Fa stream +being a read-only descriptor, +.Fn fflush +returns 0. .Sh SEE ALSO .Xr write 2 , .Xr fclose 3 ,