diff options
Diffstat (limited to 'lib/libc/sys')
| -rw-r--r-- | lib/libc/sys/bind.2 | 4 | ||||
| -rw-r--r-- | lib/libc/sys/dup.2 | 4 | ||||
| -rw-r--r-- | lib/libc/sys/intro.2 | 6 | ||||
| -rw-r--r-- | lib/libc/sys/kqueue.2 | 54 | ||||
| -rw-r--r-- | lib/libc/sys/modctl.2 | 4 | ||||
| -rw-r--r-- | lib/libc/sys/read.2 | 6 | ||||
| -rw-r--r-- | lib/libc/sys/readlink.2 | 6 | ||||
| -rw-r--r-- | lib/libc/sys/select.2 | 32 | ||||
| -rw-r--r-- | lib/libc/sys/semctl.2 | 4 | ||||
| -rw-r--r-- | lib/libc/sys/sigaltstack.2 | 4 | ||||
| -rw-r--r-- | lib/libc/sys/timer_create.2 | 6 | ||||
| -rw-r--r-- | lib/libc/sys/write.2 | 6 |
12 files changed, 68 insertions, 68 deletions
diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2 index fa3ca67311e..a5511348263 100644 --- a/lib/libc/sys/bind.2 +++ b/lib/libc/sys/bind.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: bind.2,v 1.29 2015/04/05 20:41:05 wiz Exp $ +.\" $NetBSD: bind.2,v 1.30 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. @@ -97,7 +97,7 @@ address space. .It Bq Er EINVAL The socket is already bound to an address; or the family of the socket and that requested in -.Fa name-\*[Gt]sa_family +.Fa name->sa_family are not equivalent. .It Bq Er ENOTSOCK .Fa s diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2 index 79acbba6dde..d6850674cc4 100644 --- a/lib/libc/sys/dup.2 +++ b/lib/libc/sys/dup.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: dup.2,v 1.32 2017/02/21 18:01:38 abhinav Exp $ +.\" $NetBSD: dup.2,v 1.33 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -177,7 +177,7 @@ input or standard output of a subprocess. That is done approximately as follows (error handling omitted for clarity): .Bd -literal -offset indent -#include \*[Lt]unistd.h\*[Gt] +#include <unistd.h> int fds[2]; pid_t pid; diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 9262391414f..f2e6a06cb62 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: intro.2,v 1.59 2017/05/14 12:30:37 wiz Exp $ +.\" $NetBSD: intro.2,v 1.60 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1980, 1983, 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -209,8 +209,8 @@ Maximum number of file descriptors allowable on the system has been reached and a request for an open cannot be satisfied until at least one has been closed. .It Er 24 EMFILE Em "Too many open files" . -\*[Lt]As released, the limit on the number of -open files per process is 64.\*[Gt] +<As released, the limit on the number of +open files per process is 64.> The .Xr getrlimit 2 call with the diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index a69765039d5..71561875f30 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: kqueue.2,v 1.45 2017/06/07 20:54:59 kamil Exp $ +.\" $NetBSD: kqueue.2,v 1.46 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 2000 Jonathan Lemon .\" All rights reserved. @@ -52,7 +52,7 @@ .Fn kqueue1 "int flags" .Ft int .Fn kevent "int kq" "const struct kevent *changelist" "size_t nchanges" "struct kevent *eventlist" "size_t nevents" "const struct timespec *timeout" -.Fn EV_SET "\*[Am]kev" ident filter flags fflags data udata +.Fn EV_SET "&kev" ident filter flags fflags data udata .Sh DESCRIPTION .Fn kqueue provides a generic method of notifying the user when an event @@ -523,14 +523,14 @@ The following example program monitors a file (provided to it as the first argument) and prints information about some common events it receives notifications for: .Bd -literal -offset indent -#include \*[Lt]sys/types.h\*[Gt] -#include \*[Lt]sys/event.h\*[Gt] -#include \*[Lt]sys/time.h\*[Gt] -#include \*[Lt]stdio.h\*[Gt] -#include \*[Lt]unistd.h\*[Gt] -#include \*[Lt]stdlib.h\*[Gt] -#include \*[Lt]fcntl.h\*[Gt] -#include \*[Lt]err.h\*[Gt] +#include <sys/types.h> +#include <sys/event.h> +#include <sys/time.h> +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#include <fcntl.h> +#include <err.h> int main(int argc, char *argv[]) @@ -545,44 +545,44 @@ main(int argc, char *argv[]) if ((kq = kqueue()) == -1) err(1, "Cannot create kqueue"); - EV_SET(\*[Am]ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, + EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND|NOTE_ATTRIB|NOTE_LINK| NOTE_RENAME|NOTE_REVOKE, 0, 0); - if (kevent(kq, \*[Am]ev, 1, NULL, 0, \*[Am]tout) == -1) + if (kevent(kq, &ev, 1, NULL, 0, &tout) == -1) err(1, "kevent"); for (;;) { - nev = kevent(kq, NULL, 0, \*[Am]ev, 1, \*[Am]tout); + nev = kevent(kq, NULL, 0, &ev, 1, &tout); if (nev == -1) err(1, "kevent"); if (nev == 0) continue; - if (ev.fflags \*[Am] NOTE_DELETE) { + if (ev.fflags & NOTE_DELETE) { printf("deleted "); - ev.fflags \*[Am]= ~NOTE_DELETE; + ev.fflags &= ~NOTE_DELETE; } - if (ev.fflags \*[Am] NOTE_WRITE) { + if (ev.fflags & NOTE_WRITE) { printf("written "); - ev.fflags \*[Am]= ~NOTE_WRITE; + ev.fflags &= ~NOTE_WRITE; } - if (ev.fflags \*[Am] NOTE_EXTEND) { + if (ev.fflags & NOTE_EXTEND) { printf("extended "); - ev.fflags \*[Am]= ~NOTE_EXTEND; + ev.fflags &= ~NOTE_EXTEND; } - if (ev.fflags \*[Am] NOTE_ATTRIB) { + if (ev.fflags & NOTE_ATTRIB) { printf("chmod/chown/utimes "); - ev.fflags \*[Am]= ~NOTE_ATTRIB; + ev.fflags &= ~NOTE_ATTRIB; } - if (ev.fflags \*[Am] NOTE_LINK) { + if (ev.fflags & NOTE_LINK) { printf("hardlinked "); - ev.fflags \*[Am]= ~NOTE_LINK; + ev.fflags &= ~NOTE_LINK; } - if (ev.fflags \*[Am] NOTE_RENAME) { + if (ev.fflags & NOTE_RENAME) { printf("renamed "); - ev.fflags \*[Am]= ~NOTE_RENAME; + ev.fflags &= ~NOTE_RENAME; } - if (ev.fflags \*[Am] NOTE_REVOKE) { + if (ev.fflags & NOTE_REVOKE) { printf("revoked "); - ev.fflags \*[Am]= ~NOTE_REVOKE; + ev.fflags &= ~NOTE_REVOKE; } printf("\\n"); if (ev.fflags) diff --git a/lib/libc/sys/modctl.2 b/lib/libc/sys/modctl.2 index b3bec109cbe..b40ab8bc622 100644 --- a/lib/libc/sys/modctl.2 +++ b/lib/libc/sys/modctl.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: modctl.2,v 1.12 2015/11/04 04:31:53 pgoyette Exp $ +.\" $NetBSD: modctl.2,v 1.13 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -252,7 +252,7 @@ and is not .Dv 0 . The kernel is unable to internalize the plist. -Or, there is a problem with the module or \*[Lt]module\*[Gt].plist. +Or, there is a problem with the module or <module>.plist. .It Bq Er EMLINK The argument .Fa operation diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 3461005eb1d..aaeec8c4a3f 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: read.2,v 1.35 2013/07/14 14:29:09 njoly Exp $ +.\" $NetBSD: read.2,v 1.36 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -255,7 +255,7 @@ function call appeared in Error checks should explicitly test for \-1. Code such as .Bd -literal - while ((nr = read(fd, buf, sizeof(buf))) \*[Gt] 0) + while ((nr = read(fd, buf, sizeof(buf))) > 0) .Ed .Pp is not maximally portable, as some platforms allow for @@ -269,5 +269,5 @@ and may appear as a negative number distinct from \-1. Proper loops should use .Bd -literal - while ((nr = read(fd, buf, sizeof(buf))) != -1 \*[Am]\*[Am] nr != 0) + while ((nr = read(fd, buf, sizeof(buf))) != -1 && nr != 0) .Ed diff --git a/lib/libc/sys/readlink.2 b/lib/libc/sys/readlink.2 index 8f68ea08702..910900dbd03 100644 --- a/lib/libc/sys/readlink.2 +++ b/lib/libc/sys/readlink.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: readlink.2,v 1.32 2013/07/29 11:49:31 wiz Exp $ +.\" $NetBSD: readlink.2,v 1.33 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -95,8 +95,8 @@ which reads the contents of a symbolic link named .Pa /symbolic/link and stores them as null-terminated string: .Bd -literal -offset indent -#include \*[Lt]limits.h\*[Gt] -#include \*[Lt]unistd.h\*[Gt] +#include <limits.h> +#include <unistd.h> char buf[PATH_MAX]; ssize_t len; diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2 index 9b7b282f25a..326cf464816 100644 --- a/lib/libc/sys/select.2 +++ b/lib/libc/sys/select.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: select.2,v 1.41 2013/11/28 03:45:31 khorben Exp $ +.\" $NetBSD: select.2,v 1.42 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -162,14 +162,14 @@ including one due to an interrupted call, the descriptor sets will be unmodified. .Sh EXAMPLES .Bd -literal -#include \*[Lt]stdio.h\*[Gt] -#include \*[Lt]stdlib.h\*[Gt] -#include \*[Lt]unistd.h\*[Gt] -#include \*[Lt]string.h\*[Gt] -#include \*[Lt]err.h\*[Gt] -#include \*[Lt]errno.h\*[Gt] -#include \*[Lt]sys/types.h\*[Gt] -#include \*[Lt]sys/time.h\*[Gt] +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <err.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/time.h> int main(int argc, char **argv) @@ -186,16 +186,16 @@ main(int argc, char **argv) timeout.tv_usec = 0; /* Initialize the read set to null */ - FD_ZERO(\*[Am]read_set); + FD_ZERO(&read_set); /* Add file descriptor 1 to read_set */ - FD_SET(fd, \*[Am]read_set); + FD_SET(fd, &read_set); /* * Check if data is ready to be read on * file descriptor 1, give up after 10 seconds. */ - ret = select(fd + 1, \*[Am]read_set, NULL, NULL, \*[Am]timeout); + ret = select(fd + 1, &read_set, NULL, NULL, &timeout); /* * Returned value is the number of file @@ -218,11 +218,11 @@ main(int argc, char **argv) * only descriptors ready for I/O are set. These can * be tested using FD_ISSET */ - for (i = 0; i \*[Lt]= fd; i++) { - if (FD_ISSET(i, \*[Am]read_set)) { + for (i = 0; i <= fd; i++) { + if (FD_ISSET(i, &read_set)) { printf("Data on file descriptor %d\en", i); /* Remove the file descriptor from the set */ - FD_CLR(fd, \*[Am]read_set); + FD_CLR(fd, &read_set); } } break; @@ -322,7 +322,7 @@ userland libraries: return (-1); } FD_SET(fd, fdsr); - n = select(max+1, fdsr, NULL, NULL, \*[Am]tv); + n = select(max+1, fdsr, NULL, NULL, &tv); ... free(fdsr); .Ed diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2 index 99ad0e7b906..fe9f031072b 100644 --- a/lib/libc/sys/semctl.2 +++ b/lib/libc/sys/semctl.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: semctl.2,v 1.20 2010/03/22 19:30:55 joerg Exp $ +.\" $NetBSD: semctl.2,v 1.21 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1995 Frank van der Linden .\" All rights reserved. @@ -57,7 +57,7 @@ If required, it is a union of the following fields: .Bd -literal int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_{STAT,SET} */ - u_short *array; /* array for GETALL \*[Am] SETALL */ + u_short *array; /* array for GETALL & SETALL */ .Ed .Pp The diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2 index 2976718e586..b3c5fb3e8fd 100644 --- a/lib/libc/sys/sigaltstack.2 +++ b/lib/libc/sys/sigaltstack.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: sigaltstack.2,v 1.24 2014/09/27 12:11:13 njoly Exp $ +.\" $NetBSD: sigaltstack.2,v 1.25 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -110,7 +110,7 @@ if ((sigstk.ss_sp = malloc(SIGSTKSZ)) == NULL) /* error return */ sigstk.ss_size = SIGSTKSZ; sigstk.ss_flags = 0; -if (sigaltstack(\*[Am]sigstk,0) \*[Lt] 0) +if (sigaltstack(&sigstk,0) < 0) perror("sigaltstack"); .Ed .Pp diff --git a/lib/libc/sys/timer_create.2 b/lib/libc/sys/timer_create.2 index 14da6743ca7..89d04aebb68 100644 --- a/lib/libc/sys/timer_create.2 +++ b/lib/libc/sys/timer_create.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: timer_create.2,v 1.12 2012/11/06 21:16:21 uwe Exp $ +.\" $NetBSD: timer_create.2,v 1.13 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -69,11 +69,11 @@ If the argument is .Dv NULL , then -.Fa evp-\*[Gt]sigev_notify +.Fa evp->sigev_notify defaults to .Dv SIGEV_SIGNAL and -.Fa evp-\*[Gt]sigev_value +.Fa evp->sigev_value is set to .Ar timerid . Refer to diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index dd19d524ed0..bc88462257c 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: write.2,v 1.34 2017/04/23 06:46:04 abhinav Exp $ +.\" $NetBSD: write.2,v 1.35 2017/07/03 21:32:50 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -269,7 +269,7 @@ function call appeared in Error checks should explicitly test for \-1. Code such as .Bd -literal - while ((nr = write(fd, buf, sizeof(buf))) \*[Gt] 0) + while ((nr = write(fd, buf, sizeof(buf))) > 0) .Ed .Pp is not maximally portable, as some platforms allow for @@ -283,5 +283,5 @@ and may appear as a negative number distinct from \-1. Proper loops should use .Bd -literal - while ((nr = write(fd, buf, sizeof(buf))) != -1 \*[Am]\*[Am] nr != 0) + while ((nr = write(fd, buf, sizeof(buf))) != -1 && nr != 0) .Ed |
