]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Fix description of 'offset' argument to explain the case
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 10 Jul 2006 15:48:17 +0000 (15:48 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 10 Jul 2006 15:48:17 +0000 (15:48 +0000)
where 'offset' is NULL.

man2/sendfile.2

index 865849aaae55b55fb21676ebb38bff86739a01bc..ce68236a1a092c51288a5c98eed30f99ed6f72bc 100644 (file)
@@ -56,9 +56,10 @@ should be a file descriptor opened for reading and
 .I out_fd
 should be a descriptor opened for writing.
 
+If 
 .I offset
-is a pointer to a variable holding the file offset from
-which
+is not NULL, then it points
+to a variable holding the file offset from which
 .BR sendfile ()
 will start reading data from
 .IR in_fd .
@@ -66,8 +67,14 @@ When
 .BR sendfile ()
 returns, this variable
 will be set to the offset of the byte following the last byte that was read.
+If
+.I offset
+is not NULL, then
 .BR sendfile ()
 does not modify the current file offset of 
+.IR in_fd ;
+otherwise the current file offset is adjusted to reflect 
+the number of bytes read from
 .IR in_fd .
 
 .I count
@@ -142,10 +149,10 @@ Insufficient memory to read from
 is a new feature in Linux 2.2.
 The include file <sys/sendfile.h> is present since glibc2.1.
 
-Other Unixes implement 
+Other Unix systems implement 
 .BR sendfile ()
-with different semantics and prototypes. It should
-not be used in portable programs.
+with different semantics and prototypes. 
+It should not be used in portable programs.
 .SH "SEE ALSO"
 .BR open (2),
 .BR mmap (2),