mirror of https://github.com/mkerrisk/man-pages
readv.2: Tweaks to Christoph's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
d948a87054
commit
3b31ec64ab
55
man2/readv.2
55
man2/readv.2
|
@ -186,38 +186,41 @@ The file referred to by
|
|||
must be capable of seeking.
|
||||
.SS preadv2() and pwritev2()
|
||||
|
||||
This pair of system calls has similar functionality to the
|
||||
These system calls are similar to
|
||||
.BR preadv ()
|
||||
and
|
||||
.BR pwritev ()
|
||||
calls, but adds a fifth argument, \fIflags\fP, which modifies the behavior on a per call basis.
|
||||
calls, but add a fifth argument,
|
||||
.IR flags ,
|
||||
which modifies the behavior on a per-call basis.
|
||||
|
||||
Like the
|
||||
Unlike
|
||||
.BR preadv ()
|
||||
and
|
||||
.BR pwritev ()
|
||||
calls, they accept an \fIoffset\fP argument. Unlike those calls, if the \fIoffset\fP argument is set to -1 then the current file offset is used and updated.
|
||||
.BR pwritev (),
|
||||
if the
|
||||
.I offset
|
||||
argument is \-1, then the current file offset is used and updated.
|
||||
|
||||
The \fIflags\fP arguments to
|
||||
.BR preadv2 ()
|
||||
and
|
||||
.BR pwritev2 ()
|
||||
contains a bitwise OR of one or more of the following flags:
|
||||
The
|
||||
.I flags
|
||||
argument contains a bitwise OR of zero or more of the following flags:
|
||||
.TP
|
||||
.BR RWF_HIPRI " (since Linux 4.6)"
|
||||
High priority read/write. Allows block based filesystems to use polling of the
|
||||
device, which provides lower latency, but may use additional ressources. (Currently
|
||||
only usable on a file descriptor opened using the
|
||||
.BR O_DIRECT " flag)."
|
||||
|
||||
High priority read/write.
|
||||
Allows block-based filesystems to use polling of the device,
|
||||
which provides lower latency, but may use additional resources.
|
||||
(Currently, this feature is usable only on a file descriptor opened using the
|
||||
.BR O_DIRECT
|
||||
flag.)
|
||||
.SH RETURN VALUE
|
||||
On success,
|
||||
.BR readv () ","
|
||||
.BR readv (),
|
||||
.BR preadv ()
|
||||
and
|
||||
.BR preadv2 ()
|
||||
return the number of bytes read;
|
||||
.BR writev () ","
|
||||
.BR writev (),
|
||||
.BR pwritev ()
|
||||
and
|
||||
.BR pwritev2 ()
|
||||
|
@ -236,9 +239,9 @@ The errors are as given for
|
|||
and
|
||||
.BR write (2).
|
||||
Furthermore,
|
||||
.BR preadv () ","
|
||||
.BR preadv2 () ","
|
||||
.BR pwritev ()
|
||||
.BR preadv (),
|
||||
.BR preadv2 (),
|
||||
.BR pwritev (),
|
||||
and
|
||||
.BR pwritev2 ()
|
||||
can also fail for the same reasons as
|
||||
|
@ -253,14 +256,18 @@ values overflows an
|
|||
value.
|
||||
.TP
|
||||
.B EINVAL
|
||||
The vector count \fIiovcnt\fP is less than zero or greater than the
|
||||
permitted maximum. Or, an unknown flag is specified in \fIflags\fP.
|
||||
The vector count,
|
||||
.IR iovcnt ,
|
||||
is less than zero or greater than the permitted maximum.
|
||||
.TP
|
||||
.B EINVAL
|
||||
An unknown flag is specified in \fIflags\fP.
|
||||
.SH VERSIONS
|
||||
.BR preadv ()
|
||||
and
|
||||
.BR pwritev ()
|
||||
first appeared in Linux 2.6.30; library support was added in glibc 2.10.
|
||||
.sp
|
||||
|
||||
.BR preadv2 ()
|
||||
and
|
||||
.BR pwritev2 ()
|
||||
|
@ -281,7 +288,7 @@ nonstandard, but present also on the modern BSDs.
|
|||
.sp
|
||||
.BR preadv2 (),
|
||||
.BR pwritev2 ():
|
||||
nonstandard, Linux extension.
|
||||
nonstandard Linux extension.
|
||||
.SH NOTES
|
||||
POSIX.1 allows an implementation to place a limit on
|
||||
the number of items that can be passed in
|
||||
|
|
Loading…
Reference in New Issue