mirror of https://github.com/mkerrisk/man-pages
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:
parent
7b0d1eaa6d
commit
9a12dd5031
18
man2/pread.2
18
man2/pread.2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue