Fix description of 'offset' argument to explain the case

where 'offset' is NULL.
This commit is contained in:
Michael Kerrisk 2006-07-10 15:48:17 +00:00
parent 4733f53c8c
commit db04da1f6e
1 changed files with 12 additions and 5 deletions

View 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),