summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/chmod.25
-rw-r--r--lib/libc/sys/execve.25
-rw-r--r--lib/libc/sys/getpriority.24
-rw-r--r--lib/libc/sys/gettimeofday.23
-rw-r--r--lib/libc/sys/mmap.24
-rw-r--r--lib/libc/sys/mprotect.23
-rw-r--r--lib/libc/sys/msync.25
-rw-r--r--lib/libc/sys/pathconf.26
-rw-r--r--lib/libc/sys/recv.23
-rw-r--r--lib/libc/sys/select.227
-rw-r--r--lib/libc/sys/semget.29
-rw-r--r--lib/libc/sys/sigaction.23
-rw-r--r--lib/libc/sys/socket.28
-rw-r--r--lib/libc/sys/stat.24
-rw-r--r--lib/libc/sys/write.213
15 files changed, 43 insertions, 59 deletions
diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2
index 733757b6bab..3c016ce7c3f 100644
--- a/lib/libc/sys/chmod.2
+++ b/lib/libc/sys/chmod.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: chmod.2,v 1.12 2003/12/20 09:09:46 jmc Exp $
+.\" $OpenBSD: chmod.2,v 1.13 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: chmod.2,v 1.7 1995/02/27 12:32:06 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -64,8 +64,7 @@ A mode is created from
.Em or'd
permission bit masks defined in
.Aq Pa sys/stat.h :
-.Pp
-.Bd -literal -offset indent -compact
+.Bd -literal -offset indent
#define S_IRWXU 0000700 /* RWX mask for owner */
#define S_IRUSR 0000400 /* R for owner */
#define S_IWUSR 0000200 /* W for owner */
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
index aacb0b7c8ca..e70a832561f 100644
--- a/lib/libc/sys/execve.2
+++ b/lib/libc/sys/execve.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: execve.2,v 1.27 2003/12/28 21:14:18 millert Exp $
+.\" $OpenBSD: execve.2,v 1.28 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: execve.2,v 1.9 1995/02/27 12:32:25 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -63,8 +63,7 @@ and
.Xr elf 5 .
.Pp
An interpreter file begins with a line of the form:
-.Pp
-.Bd -filled -offset indent -compact
+.Bd -filled -offset indent
.Sy #!\&
.Em interpreter
.Bq Em arg
diff --git a/lib/libc/sys/getpriority.2 b/lib/libc/sys/getpriority.2
index b0ae6490f11..b9939856587 100644
--- a/lib/libc/sys/getpriority.2
+++ b/lib/libc/sys/getpriority.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getpriority.2,v 1.10 2003/12/11 23:02:30 millert Exp $
+.\" $OpenBSD: getpriority.2,v 1.11 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: getpriority.2,v 1.4 1995/02/27 12:33:15 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -123,10 +123,10 @@ or
.Dv PRIO_USER .
.El
.Pp
-.Bl -tag -width Er
In addition to the errors indicated above,
.Fn setpriority
will fail if:
+.Bl -tag -width Er
.It Bq Er EPERM
A process was located, but neither its effective nor real user
ID matched the effective user ID of the caller.
diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2
index 192ca11ba23..39c6f82599d 100644
--- a/lib/libc/sys/gettimeofday.2
+++ b/lib/libc/sys/gettimeofday.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gettimeofday.2,v 1.12 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: gettimeofday.2,v 1.13 2004/04/15 19:52:18 jmc Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -75,7 +75,6 @@ and
are defined in
.Ao Pa sys/time.h Ac
as:
-.Pp
.Bd -literal
struct timeval {
long tv_sec; /* seconds since Jan. 1, 1970 */
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index f1e37ef5273..59a57a386a4 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mmap.2,v 1.32 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: mmap.2,v 1.33 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: mmap.2,v 1.5 1995/06/24 10:48:59 cgd Exp $
.\"
.\" Copyright (c) 1991, 1993
@@ -77,7 +77,6 @@ The protections (region accessibility) are specified in the
argument by
.Tn OR Ns 'ing
the following values:
-.Pp
.Bl -tag -width MAP_FIXEDX
.It Dv PROT_EXEC
Pages may be executed.
@@ -99,7 +98,6 @@ Sharing, mapping type, and options are specified in the
argument by
.Em or Ns 'ing
the following values:
-.Pp
.Bl -tag -width MAP_FIXEDX
.It Dv MAP_ANON
Map anonymous memory not associated with any specific file.
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
index 30a43c13704..777fd7d2580 100644
--- a/lib/libc/sys/mprotect.2
+++ b/lib/libc/sys/mprotect.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mprotect.2,v 1.9 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: mprotect.2,v 1.10 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: mprotect.2,v 1.6 1995/10/12 15:41:08 jtc Exp $
.\"
.\" Copyright (c) 1991, 1993
@@ -55,7 +55,6 @@ The protections (region accessibility) are specified in the
argument by
.Tn OR Ns 'ing
the following values:
-.Pp
.Bl -tag -width MAP_FIXEDX
.It Dv PROT_EXEC
Pages may be executed.
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2
index 95b6b266082..0cb27557cc9 100644
--- a/lib/libc/sys/msync.2
+++ b/lib/libc/sys/msync.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: msync.2,v 1.17 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: msync.2,v 1.18 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: msync.2,v 1.8 1995/10/12 15:41:09 jtc Exp $
.\"
.\" Copyright (c) 1991, 1993
@@ -72,8 +72,7 @@ The
argument is formed by
.Tn OR Ns 'ing
the following values
-.Pp
-.Bd -literal -offset indent -compact
+.Bd -literal -offset indent
MS_ASYNC Perform asynchronous writes.
MS_SYNC Perform synchronous writes.
MS_INVALIDATE Invalidate cached data after writing.
diff --git a/lib/libc/sys/pathconf.2 b/lib/libc/sys/pathconf.2
index e256702c72a..ed91dde1b09 100644
--- a/lib/libc/sys/pathconf.2
+++ b/lib/libc/sys/pathconf.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pathconf.2,v 1.12 2003/09/05 21:36:47 jmc Exp $
+.\" $OpenBSD: pathconf.2,v 1.13 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: pathconf.2,v 1.2 1995/02/27 12:35:22 cgd Exp $
.\"
.\" Copyright (c) 1993
@@ -69,9 +69,7 @@ Symbolic constants for each name value are found in the include file
.Aq Pa unistd.h .
.Pp
The available values are as follows:
-.Pp
.Bl -tag -width "123456"
-.Pp
.It Dv _PC_LINK_MAX
The maximum file link count.
.It Dv _PC_MAX_CANON
@@ -145,9 +143,9 @@ Too many symbolic links were encountered in translating the pathname.
An I/O error occurred while reading from or writing to the file system.
.El
.Pp
-.Bl -tag -width [EFAULT]
.Fn fpathconf
will fail if:
+.Bl -tag -width [EFAULT]
.It Bq Er EBADF
.Fa fd
is not a valid open file descriptor.
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2
index bd665c077d6..c235e292e40 100644
--- a/lib/libc/sys/recv.2
+++ b/lib/libc/sys/recv.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: recv.2,v 1.28 2003/06/11 10:22:47 jmc Exp $
+.\" $OpenBSD: recv.2,v 1.29 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: recv.2,v 1.6 1995/02/27 12:36:08 cgd Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
@@ -148,7 +148,6 @@ call uses a
structure to minimize the number of directly supplied parameters.
This structure has the following form, as defined in
.Ao Pa sys/socket.h Ac :
-.Pp
.Bd -literal
struct msghdr {
void *msg_name; /* optional address */
diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2
index 430dfbf9d41..268ba047591 100644
--- a/lib/libc/sys/select.2
+++ b/lib/libc/sys/select.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: select.2,v 1.26 2004/02/08 19:20:23 otto Exp $
+.\" $OpenBSD: select.2,v 1.27 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: select.2,v 1.5 1995/06/27 22:32:28 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -200,21 +200,20 @@ The idea is to permit a program to work properly even if it is
with 4000 file descriptors pre-allocated.
The following illustrates the technique which is used by
userland libraries:
-.Pp
-.Bd -literal -offset indent -compact
- fd_set *fdsr;
- int max = fd;
+.Bd -literal -offset indent
+fd_set *fdsr;
+int max = fd;
- fdsr = (fd_set *)calloc(howmany(max+1, NFDBITS),
- sizeof(fd_mask));
- if (fdsr == NULL) {
- ...
- return (-1);
- }
- FD_SET(fd, fdsr);
- n = select(max+1, fdsr, NULL, NULL, &tv);
+fdsr = (fd_set *)calloc(howmany(max+1, NFDBITS),
+ sizeof(fd_mask));
+if (fdsr == NULL) {
...
- free(fdsr);
+ return (-1);
+}
+FD_SET(fd, fdsr);
+n = select(max+1, fdsr, NULL, NULL, &tv);
+\&...
+free(fdsr);
.Ed
.Pp
Alternatively, it is possible to use the
diff --git a/lib/libc/sys/semget.2 b/lib/libc/sys/semget.2
index beccd4b57b8..edfaedee062 100644
--- a/lib/libc/sys/semget.2
+++ b/lib/libc/sys/semget.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: semget.2,v 1.15 2004/03/23 17:35:04 jmc Exp $
+.\" $OpenBSD: semget.2,v 1.16 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: semget.2,v 1.2 1997/03/27 08:20:41 mikel Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
@@ -66,14 +66,13 @@ The access modes of the created semaphores is specified in
by
.Tn OR Ns 'ing
the following values:
-.Pp
-.Bd -literal -offset indent -compact
+.Bd -literal -offset indent
SEM_A alter permission for owner
SEM_R read permission for owner
-.Pp
+
SEM_A >> 3 alter permission for group
SEM_R >> 3 read permission for group
-.Pp
+
SEM_A >> 6 alter permission for other
SEM_R >> 6 read permission for other
.Ed
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index be2a5eda702..d395342c1c4 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sigaction.2,v 1.40 2003/12/02 23:41:15 deraadt Exp $
+.\" $OpenBSD: sigaction.2,v 1.41 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: sigaction.2,v 1.7 1995/10/12 15:41:16 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
@@ -351,7 +351,6 @@ The following functions are either reentrant or not interruptible
by signals and are async-signal safe.
Therefore applications may invoke them, without restriction, from
signal-catching functions:
-.Pp
.Bd -ragged -offset indent
.Xr _exit 2 ,
.Xr access 2 ,
diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2
index 9c736db5049..375e73f42c4 100644
--- a/lib/libc/sys/socket.2
+++ b/lib/libc/sys/socket.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: socket.2,v 1.21 2004/04/02 08:47:18 jmc Exp $
+.\" $OpenBSD: socket.2,v 1.22 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: socket.2,v 1.5 1995/02/27 12:37:53 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -53,8 +53,7 @@ which should be used.
These families are defined in the include file
.Ao Pa sys/socket.h Ac .
The currently understood formats are
-.Pp
-.Bd -literal -offset indent -compact
+.Bd -literal -offset indent
AF_UNIX (UNIX internal protocols),
AF_INET (ARPA Internet protocols),
AF_INET6 (ARPA IPv6 protocols),
@@ -68,8 +67,7 @@ The socket has the indicated
.Fa type ,
which specifies the semantics of communication.
Currently defined types are:
-.Pp
-.Bd -literal -offset indent -compact
+.Bd -literal -offset indent
SOCK_STREAM
SOCK_DGRAM
SOCK_RAW
diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2
index ff8647bbad6..bd8a4c6ed31 100644
--- a/lib/libc/sys/stat.2
+++ b/lib/libc/sys/stat.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: stat.2,v 1.17 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: stat.2,v 1.18 2004/04/15 19:52:18 jmc Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -215,9 +215,9 @@ points to an invalid address.
An I/O error occurred while reading from or writing to the file system.
.El
.Pp
-.Bl -tag -width Er
.Fn fstat
will fail if:
+.Bl -tag -width Er
.It Bq Er EBADF
.Fa fd
is not a valid open file descriptor.
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
index 9da5feca3c8..824b18637d0 100644
--- a/lib/libc/sys/write.2
+++ b/lib/libc/sys/write.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: write.2,v 1.27 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: write.2,v 1.28 2004/04/15 19:52:18 jmc Exp $
.\" $NetBSD: write.2,v 1.6 1995/02/27 12:39:43 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -81,8 +81,7 @@ and
the
.Fa iovec
structure is defined as:
-.Pp
-.Bd -literal -offset indent -compact
+.Bd -literal -offset indent
struct iovec {
void *iov_base;
size_t iov_len;
@@ -263,8 +262,8 @@ function call appeared in
.Sh CAVEATS
Error checks should explicitly test for \-1.
Code such as
-.Bd -literal
- while ((nr = write(fd, buf, sizeof(buf))) > 0)
+.Bd -literal -offset indent
+while ((nr = write(fd, buf, sizeof(buf))) > 0)
.Ed
.Pp
is not maximally portable, as some platforms allow for
@@ -277,6 +276,6 @@ and
.Fn write
may appear as a negative number distinct from \-1.
Proper loops should use
-.Bd -literal
- while ((nr = write(fd, buf, sizeof(buf))) != -1 && nr != 0)
+.Bd -literal -offset indent
+while ((nr = write(fd, buf, sizeof(buf))) != -1 && nr != 0)
.Ed