Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2019 19:56:02 +0000 (UTC)
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343444 - head/lib/libc/sys
Message-ID:  <201901251956.x0PJu28l083444@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri Jan 25 19:56:02 2019
New Revision: 343444
URL: https://svnweb.freebsd.org/changeset/base/343444

Log:
  Document that `sendfile` will return an invalid value for `sbytes` if provided an invalid address
  
  This is meant to clarify the fact that the system call will not fail
  with -1/EFAULT, as one might expect, when reading the sendfile(2)
  manpage today.
  
  While here, pet the mandoc linter, when dealing with the section that
  describes valid values for `flags`.
  
  PR:	232210
  MFC after:	2 weeks
  Approved by:	emaste (mentor)
  Reviewed by:	glebius, 0mp
  Differential Revision: https://reviews.freebsd.org/D18949

Modified:
  head/lib/libc/sys/sendfile.2

Modified: head/lib/libc/sys/sendfile.2
==============================================================================
--- head/lib/libc/sys/sendfile.2	Fri Jan 25 19:36:20 2019	(r343443)
+++ head/lib/libc/sys/sendfile.2	Fri Jan 25 19:56:02 2019	(r343444)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 12, 2018
+.Dd January 25, 2019
 .Dt SENDFILE 2
 .Os
 .Sh NAME
@@ -104,7 +104,7 @@ variable pointed to by
 The least significant 16 bits of
 .Fa flags
 argument is a bitmap of these values:
-.Bl -tag -offset indent
+.Bl -tag -offset indent -width "SF_USER_READAHEAD"
 .It Dv SF_NODISKIO
 This flag causes
 .Nm
@@ -403,3 +403,14 @@ The
 .Fx 11
 implementation was written by
 .An Gleb Smirnoff Aq Mt glebius@FreeBSD.org .
+.Sh BUGS
+The
+.Fn sendfile
+system call will not fail, i.e., return
+.Dv -1
+and set
+.Va errno
+to
+.Er EFAULT ,
+if provided an invalid address for
+.Fa sbytes .



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901251956.x0PJu28l083444>