From: Michael Kerrisk Date: Mon, 10 Jul 2006 15:48:17 +0000 (+0000) Subject: Fix description of 'offset' argument to explain the case X-Git-Tag: man-pages-2.36~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db04da1f6ee25d18db4aa374e9b462baf333909b;p=thirdparty%2Fman-pages.git Fix description of 'offset' argument to explain the case where 'offset' is NULL. --- diff --git a/man2/sendfile.2 b/man2/sendfile.2 index 865849aaae..ce68236a1a 100644 --- a/man2/sendfile.2 +++ b/man2/sendfile.2 @@ -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 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),