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
|
.I fd
|
||||||
must be capable of seeking.
|
must be capable of seeking.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
On success, the number of bytes read or written is returned (zero
|
On success,
|
||||||
indicates that nothing was written, in the case of
|
.BR pread ()
|
||||||
.BR pwrite (),
|
returns the number of bytes read
|
||||||
or
|
(a return of zero indicates end of file)
|
||||||
end of file, in the case of
|
and
|
||||||
.BR pread ()),
|
.BR pwrite ()
|
||||||
or \-1 on error, in which case
|
returns the number of bytes written.
|
||||||
|
|
||||||
|
On error, \-1 is returned and
|
||||||
.I errno
|
.I errno
|
||||||
is set to indicate the error.
|
is set to indicate the cause of the error.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
.BR pread ()
|
.BR pread ()
|
||||||
can fail and set
|
can fail and set
|
||||||
|
|
Loading…
Reference in New Issue