From owner-svn-src-stable@freebsd.org Thu Feb 13 03:11:39 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDAC324B6B6; Thu, 13 Feb 2020 03:11:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48J1kg4fh4z4Ng3; Thu, 13 Feb 2020 03:11:39 +0000 (UTC) (envelope-from kevans@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A24041D0; Thu, 13 Feb 2020 03:11:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01D3BdtK068162; Thu, 13 Feb 2020 03:11:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D3BdpA068161; Thu, 13 Feb 2020 03:11:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002130311.01D3BdpA068161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 13 Feb 2020 03:11:39 +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: r357851 - stable/11/lib/libc/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/lib/libc/stdio X-SVN-Commit-Revision: 357851 X-SVN-Commit-Repository: base 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.29 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: Thu, 13 Feb 2020 03:11:39 -0000 Author: kevans Date: Thu Feb 13 03:11:39 2020 New Revision: 357851 URL: https://svnweb.freebsd.org/changeset/base/357851 Log: MFC r327181: fsync(3): correctly document return values In r268924 the behavior of fflush was changed to return success on read only streams. Document this. Modified: stable/11/lib/libc/stdio/fflush.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdio/fflush.3 ============================================================================== --- stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 01:42:13 2020 (r357850) +++ stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 03:11:39 2020 (r357851) @@ -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 ,