diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-04-08 19:49:56 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-04-08 19:49:56 +0000 |
commit | 50db18c72b639646633f9c610aea785786deda4e (patch) | |
tree | 78fe23ab6b97b7b8032833b559416d128829f19f /lib/libc/sys | |
parent | 1c1b8afeaa8539ca2750d56d48344fd5ca467008 (diff) |
Updates to SYNOPSIS, ERRORS, and STANDARDS.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/lseek.2 | 6 | ||||
-rw-r--r-- | lib/libc/sys/nanosleep.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/socket.2 | 20 | ||||
-rw-r--r-- | lib/libc/sys/socketpair.2 | 23 | ||||
-rw-r--r-- | lib/libc/sys/truncate.2 | 38 |
5 files changed, 65 insertions, 43 deletions
diff --git a/lib/libc/sys/lseek.2 b/lib/libc/sys/lseek.2 index 5c91ce3f86d..b994573666f 100644 --- a/lib/libc/sys/lseek.2 +++ b/lib/libc/sys/lseek.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lseek.2,v 1.15 2011/11/06 17:22:20 schwarze Exp $ +.\" $OpenBSD: lseek.2,v 1.16 2013/04/08 19:49:55 guenther Exp $ .\" $NetBSD: lseek.2,v 1.6 1995/02/27 12:34:09 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)lseek.2 8.3 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: November 6 2011 $ +.Dd $Mdocdate: April 8 2013 $ .Dt LSEEK 2 .Os .Sh NAME @@ -123,7 +123,7 @@ offsets to be used. The .Fn lseek function conforms to -.St -p1003.1-88 . +.St -p1003.1-2008 . .Sh HISTORY A .Fn seek diff --git a/lib/libc/sys/nanosleep.2 b/lib/libc/sys/nanosleep.2 index fafdd1ac8d7..f863db4c4f5 100644 --- a/lib/libc/sys/nanosleep.2 +++ b/lib/libc/sys/nanosleep.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: nanosleep.2,v 1.11 2008/10/24 14:34:39 jmc Exp $ +.\" $OpenBSD: nanosleep.2,v 1.12 2013/04/08 19:49:55 guenther Exp $ .\" $NetBSD: nanosleep.2,v 1.1 1997/04/17 18:12:02 jtc Exp $ .\" .\" Copyright (c) 1986, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)sleep.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: October 24 2008 $ +.Dd $Mdocdate: April 8 2013 $ .Dt NANOSLEEP 2 .Os .Sh NAME @@ -70,12 +70,6 @@ function shall return \-1 and set .Va errno to the corresponding value. .Bl -tag -width Er -.It Bq Er EFAULT -Either -.Fa rqtp -or -.Fa rmtp -points to memory that is not a valid part of the process address space. .It Bq Er EINTR .Nm was interrupted by the delivery of a signal. @@ -83,9 +77,12 @@ was interrupted by the delivery of a signal. .Fa rqtp specified a nanosecond value less than zero or greater than 1000 million, or a second value less than zero or greater than 100 million. -.It Bq Er ENOSYS -.Nm -is not supported by this implementation. +.It Bq Er EFAULT +Either +.Fa rqtp +or +.Fa rmtp +points to memory that is not a valid part of the process address space. .El .Sh SEE ALSO .Xr sleep 1 , @@ -94,4 +91,4 @@ is not supported by this implementation. The .Fn nanosleep function conforms to -.St -p1003.1b-93 . +.St -p1003.1-2008 . diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2 index 594098d24f6..da6bc8d3cae 100644 --- a/lib/libc/sys/socket.2 +++ b/lib/libc/sys/socket.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: socket.2,v 1.33 2013/03/12 00:19:02 dlg Exp $ +.\" $OpenBSD: socket.2,v 1.34 2013/04/08 19:49:55 guenther Exp $ .\" $NetBSD: socket.2,v 1.5 1995/02/27 12:37:53 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,14 +30,13 @@ .\" .\" @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: March 12 2013 $ +.Dd $Mdocdate: April 8 2013 $ .Dt SOCKET 2 .Os .Sh NAME .Nm socket .Nd create an endpoint for communication .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <sys/socket.h> .Ft int .Fn socket "int domain" "int type" "int protocol" @@ -210,19 +209,23 @@ The .Fn socket call fails if: .Bl -tag -width Er +.It Bq Er EAFNOSUPPORT +The specified address family is not supported on this machine. .It Bq Er EPROTONOSUPPORT The protocol type or the specified protocol is not supported within this domain. +.It Bq Er EPROTOTYPE +The combination of the specified protocol and type is not supported. .It Bq Er EMFILE The per-process descriptor table is full. .It Bq Er ENFILE The system file table is full. +.It Bq Er ENOBUFS +Insufficient resources were available in the system +to perform the operation. .It Bq Er EACCES Permission to create a socket of the specified type and/or protocol is denied. -.It Bq Er ENOBUFS -Insufficient buffer space is available. -The socket cannot be created until sufficient resources are freed. .El .Sh SEE ALSO .Xr accept 2 , @@ -254,6 +257,11 @@ The socket cannot be created until sufficient resources are freed. .%T "BSD Interprocess Communication Tutorial" .%O "reprinted in UNIX Programmer's Supplementary Documents Volume 1" .Re +.Sh STANDARDS +The +.Fn socket +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn socket diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2 index 72d655e4949..b4131ffea98 100644 --- a/lib/libc/sys/socketpair.2 +++ b/lib/libc/sys/socketpair.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: socketpair.2,v 1.14 2011/11/06 12:07:42 deraadt Exp $ +.\" $OpenBSD: socketpair.2,v 1.15 2013/04/08 19:49:55 guenther Exp $ .\" $NetBSD: socketpair.2,v 1.5 1995/02/27 12:38:00 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,17 +30,16 @@ .\" .\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: November 6 2011 $ +.Dd $Mdocdate: April 8 2013 $ .Dt SOCKETPAIR 2 .Os .Sh NAME .Nm socketpair .Nd create a pair of connected sockets .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <sys/socket.h> .Ft int -.Fn socketpair "int d" "int type" "int protocol" "int *sv" +.Fn socketpair "int d" "int type" "int protocol" "int sv[2]" .Sh DESCRIPTION The .Fn socketpair @@ -62,31 +61,37 @@ A 0 is returned if the call succeeds, \-1 if it fails. .Sh ERRORS The call succeeds unless: .Bl -tag -width Er -.It Bq Er EMFILE -Too many descriptors are in use by this process. .It Bq Er EAFNOSUPPORT The specified address family is not supported on this machine. .It Bq Er EPROTONOSUPPORT The specified protocol is not supported on this machine. .It Bq Er EOPNOTSUPP The specified protocol does not support creation of socket pairs. +.It Bq Er EPROTOTYPE +The combination of the specified protocol and type is not supported. +.It Bq Er EMFILE +The per-process descriptor table is full. +.It Bq Er ENFILE +The system file table is full. +.It Bq Er ENOBUFS +Insufficient resources were available in the system +to perform the operation. .It Bq Er EFAULT The address .Fa sv does not specify a valid part of the process address space. -.It Bq Er ENFILE -The system file table is full. .El .Sh SEE ALSO .Xr pipe 2 , .Xr read 2 , +.Xr socket 2 , .Xr write 2 .Sh STANDARDS The .Fn socketpair function conforms to -.St -xpg4.2 . +.St -p1003.1-2008 . .Sh HISTORY The .Fn socketpair diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2 index 9c528e3a206..23c9c45f449 100644 --- a/lib/libc/sys/truncate.2 +++ b/lib/libc/sys/truncate.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: truncate.2,v 1.13 2007/05/31 19:19:34 jmc Exp $ +.\" $OpenBSD: truncate.2,v 1.14 2013/04/08 19:49:55 guenther Exp $ .\" $NetBSD: truncate.2,v 1.7 1995/02/27 12:39:00 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: April 8 2013 $ .Dt TRUNCATE 2 .Os .Sh NAME @@ -65,7 +65,21 @@ If the call fails a \-1 is returned, and the global variable specifies the error. .Sh ERRORS .Fn truncate -succeeds unless: +and +.Fn ftruncate +will succeed unless: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa length +is a negative value. +.It Bq Er EIO +An I/O error occurred updating the inode. +.El +.Pp +In addition, +.Fn truncate +may return the following errors: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. @@ -89,18 +103,13 @@ The named file is a directory. The named file resides on a read-only file system. .It Bq Er ETXTBSY The file is a pure procedure (shared text) file that is being executed. -.It Bq Er EIO -An I/O error occurred updating the inode. .It Bq Er EFAULT .Fa path points outside the process's allocated address space. -.It Bq Er EPERM -The effective user ID does not match the owner of the file and -the effective user ID is not the superuser. .El .Pp .Fn ftruncate -succeeds unless: +may return the following errors: .Bl -tag -width Er .It Bq Er EBADF The @@ -114,13 +123,16 @@ references a socket, not a file. The .Fa fd is not open for writing. -.It Bq Er EINVAL -The -.Fa length -is a negative value. .El .Sh SEE ALSO .Xr open 2 +.Sh STANDARDS +The +.Fn truncate +and +.Fn ftruncate +functions conform to +.St -p1003.1-2008 . .Sh HISTORY The .Fn truncate |