From 3212d7665ef9937f47531f305acf0eadb4c55639 Mon Sep 17 00:00:00 2001 From: michaels Date: Fri, 13 Dec 1996 21:20:50 +0000 Subject: [PATCH] make UIO_MAXIOV note more prominent --- lib/libc/sys/read.2 | 12 ++++++++++-- lib/libc/sys/write.2 | 13 ++++++++++--- 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 -- 2.20.1