summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormichaels <michaels@cvs.openbsd.org>1996-12-13 21:20:52 +0000
committermichaels <michaels@cvs.openbsd.org>1996-12-13 21:20:52 +0000
commitab3aafcb19ac4c40ddda443dafe46675cd333304 (patch)
treee43e502351afca59e80925f34ea9eeb434963d5e /lib
parentd700109069b55df7462d45e39540b2fcf5185ccd (diff)
make UIO_MAXIOV note more prominent
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/read.212
-rw-r--r--lib/libc/sys/write.213
2 files changed, 20 insertions, 5 deletions
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2
index ae4af1357d8..6d5fc99ad58 100644
--- a/lib/libc/sys/read.2
+++ b/lib/libc/sys/read.2
@@ -56,7 +56,7 @@ of data from the object referenced by the descriptor
.Fa d
into the buffer pointed to by
.Fa buf .
-.Fn Readv
+.Fn \ Readv
performs the same action, but scatters the input data
into the
.Fa iovcnt
@@ -109,6 +109,13 @@ The system guarantees to read the number of bytes requested if
the descriptor references a normal file that has that many bytes left
before the end-of-file, but in no other case.
.Pp
+Note that
+.Fn readv
+will fail if the value of
+.Fa iovcnt
+exceedes the constant
+.Fa UIO_MAXIOV .
+.Pp
.Sh RETURN VALUES
If successful, the
number of bytes actually read is returned. Upon reading end-of-file,
@@ -149,7 +156,8 @@ may return one of the following errors:
.It Bq Er EINVAL
.Fa Iovcnt
was less than or equal to 0, or greater than
-.Dv {UIO_MAXIOV} .
+.\".Dv {UIO_MAXIOV} .
+.Fa UIO_MAXIOV
.It Bq Er EINVAL
One of the
.Fa iov_len
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
index bb4813789d3..56a32fb542d 100644
--- a/lib/libc/sys/write.2
+++ b/lib/libc/sys/write.2
@@ -55,8 +55,8 @@ attempts to write
of data to the object referenced by the descriptor
.Fa d
from the buffer pointed to by
-.Fa buf .
-.Fn Writev
+.Fa buf .
+.Fn \ Writev
performs the same action, but gathers the output data
from the
.Fa iovcnt
@@ -117,6 +117,13 @@ and
may write fewer bytes than requested;
the return value must be noted,
and the remainder of the operation should be retried when possible.
+.Pp
+Note that
+.Fn writev
+will fail if the value of
+.Fa iovcnt
+exceedes the constant
+.Fa UIO_MAXIOV .
.Sh RETURN VALUES
Upon successful completion the number of bytes which were written
is returned. Otherwise a -1 is returned and the global variable
@@ -170,7 +177,7 @@ may return one of the following errors:
.It Bq Er EINVAL
.Fa Iovcnt
was less than or equal to 0, or greater than
-.Dv {UIO_MAXIOV} .
+.Fa UIO_MAXIOV .
.It Bq Er EINVAL
One of the
.Fa iov_len