pread.2: Rewrite RETURN VALUE section

(Also drop the text on pwrite() returning zero; that seems bogus.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-05-11 15:09:04 +02:00
parent 7b0d1eaa6d
commit 9a12dd5031
1 changed files with 10 additions and 8 deletions

View File

@ -77,15 +77,17 @@ The file referenced by
.I fd
must be capable of seeking.
.SH RETURN VALUE
On success, the number of bytes read or written is returned (zero
indicates that nothing was written, in the case of
.BR pwrite (),
or
end of file, in the case of
.BR pread ()),
or \-1 on error, in which case
On success,
.BR pread ()
returns the number of bytes read
(a return of zero indicates end of file)
and
.BR pwrite ()
returns the number of bytes written.
On error, \-1 is returned and
.I errno
is set to indicate the error.
is set to indicate the cause of the error.
.SH ERRORS
.BR pread ()
can fail and set