diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-12-30 09:46:24 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-12-30 09:46:24 +0000 |
commit | 1bb735affa60add8b6cfffbf555c05714d99fa09 (patch) | |
tree | b2128ceed6f1f3fcaa1de80bb592eaba29bd0c67 /lib/libc | |
parent | da18af90f0bebfab92281495b4fc96960da6644d (diff) |
Document ESPIPE and make EFAULT cover all functions.
jmc@ deraadt@ ok
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/read.2 | 24 | ||||
-rw-r--r-- | lib/libc/sys/write.2 | 26 |
2 files changed, 34 insertions, 16 deletions
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 17c4c7e2bd8..727c0df65e0 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: read.2,v 1.27 2007/05/31 19:19:33 jmc Exp $ +.\" $OpenBSD: read.2,v 1.28 2009/12/30 09:46:23 fgsch Exp $ .\" $NetBSD: read.2,v 1.6 1995/02/27 12:35:47 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: December 30 2009 $ .Dt READ 2 .Os .Sh NAME @@ -150,8 +150,11 @@ will succeed unless: .Fa d is not a valid file or socket descriptor open for reading. .It Bq Er EFAULT +Part of +.Fa iov +or .Fa buf -points outside the allocated address space. +points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from the file system, or the process is a member of a background process attempting to read @@ -183,7 +186,16 @@ was larger than .Dv SSIZE_MAX . .El .Pp -Also, +.Fn pread +and +.Fn preadv +may return the following error: +.Bl -tag -width Er +.It Bq Er ESPIPE +.Fa d +is associated with a pipe, socket, or FIFO. +.El +.Pp .Fn readv and .Fn preadv @@ -200,10 +212,6 @@ values in the .Fa iov array overflowed an .Em ssize_t . -.It Bq Er EFAULT -Part of the -.Fa iov -points outside the process's allocated address space. .El .Sh SEE ALSO .Xr dup 2 , diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index 6ded0b365cd..c7d124b03e4 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: write.2,v 1.32 2009/12/29 10:25:43 sobrado Exp $ +.\" $OpenBSD: write.2,v 1.33 2009/12/30 09:46:23 fgsch Exp $ .\" $NetBSD: write.2,v 1.6 1995/02/27 12:39:43 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" -.Dd $Mdocdate: December 29 2009 $ +.Dd $Mdocdate: December 30 2009 $ .Dt WRITE 2 .Os .Sh NAME @@ -182,6 +182,12 @@ An I/O error occurred while reading from or writing to the file system. .It Bq Er EAGAIN The file was marked for non-blocking I/O, and no data could be written immediately. +.It Bq Er EFAULT +Part of +.Fa iov +or +.Fa buf +points outside the process's allocated address space. .El .Pp In addition, @@ -190,18 +196,22 @@ and .Fn pwrite may return the following error: .Bl -tag -width Er -.It Bq Er EFAULT -Part of -.Fa iov -or data to be written to the file points outside the process's -allocated address space. .It Bq Er EINVAL .Fa nbytes was larger than .Ev SSIZE_MAX . .El .Pp -Also, +.Fn pwrite +and +.Fn pwritev +may return the following error: +.Bl -tag -width Er +.It Bq Er ESPIPE +.Fa d +is associated with a pipe, socket, or FIFO. +.El +.Pp .Fn writev and .Fn pwritev |