From: deraadt Date: Thu, 14 Dec 1995 02:21:06 +0000 (+0000) Subject: from netbsd: X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=025f99edb58dde685af4fa39d88614f1815bb11d;p=openbsd from netbsd: add & fix a bunch of system call pages --- diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 90235626dd5..4e911f4dfa0 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.34 1995/09/25 00:57:28 christos Exp $ +# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 # sys sources @@ -97,6 +97,9 @@ MAN+= accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chflags.2 \ socketpair.2 stat.2 statfs.2 swapon.2 symlink.2 sync.2 sysarch.2 \ syscall.2 truncate.2 umask.2 unlink.2 utimes.2 vfork.2 wait.2 write.2 +MAN+= msgctl.2 shmctl.2 shmat.2 semop.2 semget.2 semctl.2 msgsnd.2 msgrcv.2 \ + msgget.2 shmget.2 + MLINKS+=brk.2 sbrk.2 MLINKS+=dup.2 dup2.2 MLINKS+=chdir.2 fchdir.2 diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2 index dde344727bd..30bf72b78d2 100644 --- a/lib/libc/sys/adjtime.2 +++ b/lib/libc/sys/adjtime.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: adjtime.2,v 1.4 1995/02/27 12:31:52 cgd Exp $ +.\" $NetBSD: adjtime.2,v 1.5 1995/10/12 15:40:44 jtc Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -42,7 +42,7 @@ .Sh SYNOPSIS .Fd #include .Ft int -.Fn adjtime "struct timeval *delta" "struct timeval *olddelta" +.Fn adjtime "const struct timeval *delta" "struct timeval *olddelta" .Sh DESCRIPTION .Fn Adjtime makes small adjustments to the system time, as returned by diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2 index be5aac93bd5..9c4404cdd65 100644 --- a/lib/libc/sys/bind.2 +++ b/lib/libc/sys/bind.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: bind.2,v 1.7 1995/02/27 12:31:54 cgd Exp $ +.\" $NetBSD: bind.2,v 1.8 1995/10/12 15:40:46 jtc Exp $ .\" .\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fd #include .Fd #include .Ft int -.Fn bind "int s" "struct sockaddr *name" "int namelen" +.Fn bind "int s" "const struct sockaddr *name" "int namelen" .Sh DESCRIPTION .Fn Bind assigns a name to an unnamed socket. diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2 index bdb1c6b0eca..94d8972727f 100644 --- a/lib/libc/sys/chown.2 +++ b/lib/libc/sys/chown.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: chown.2,v 1.9 1995/02/27 12:32:09 cgd Exp $ +.\" $NetBSD: chown.2,v 1.10 1995/10/12 15:40:47 jtc Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -46,7 +46,7 @@ .Ft int .Fn chown "const char *path" "uid_t owner" "gid_t group" .Ft int -.Fn fchown "int fd" "uid_t owner" "uid_t group" +.Fn fchown "int fd" "uid_t owner" "gid_t group" .Sh DESCRIPTION The owner ID and group ID of the file named by diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2 index 5ea30f4d647..6f8d8db1875 100644 --- a/lib/libc/sys/connect.2 +++ b/lib/libc/sys/connect.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: connect.2,v 1.7 1995/02/27 12:32:17 cgd Exp $ +.\" $NetBSD: connect.2,v 1.8 1995/10/12 15:40:48 jtc Exp $ .\" .\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fd #include .Fd #include .Ft int -.Fn connect "int s" "struct sockaddr *name" "int namelen" +.Fn connect "int s" "const struct sockaddr *name" "int namelen" .Sh DESCRIPTION The parameter .Fa s diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2 index 4fc670ca3d2..e6cc24a50ab 100644 --- a/lib/libc/sys/getdirentries.2 +++ b/lib/libc/sys/getdirentries.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdirentries.2,v 1.6 1995/02/27 12:32:41 cgd Exp $ +.\" $NetBSD: getdirentries.2,v 1.7 1995/10/12 15:40:50 jtc Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -40,7 +40,7 @@ .Nm getdirentries .Nd "get directory entries in a filesystem independent format" .Sh SYNOPSIS -.Fd #include +.Fd #include .Ft int .Fn getdirentries "int fd" "char *buf" "int nbytes" "long *basep" .Sh DESCRIPTION diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2 index fb288d02162..ff12795ad19 100644 --- a/lib/libc/sys/getfh.2 +++ b/lib/libc/sys/getfh.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getfh.2,v 1.6 1995/02/27 12:32:44 cgd Exp $ +.\" $NetBSD: getfh.2,v 1.7 1995/10/12 15:40:53 jtc Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fd #include .Fd #include .Ft int -.Fn getfh "char *path" "fhandle_t *fhp" +.Fn getfh "const char *path" "fhandle_t *fhp" .Sh DESCRIPTION .Fn Getfh returns a file handle for the specified file or directory diff --git a/lib/libc/sys/getitimer.2 b/lib/libc/sys/getitimer.2 index 7b612771f3d..2f22c203ff2 100644 --- a/lib/libc/sys/getitimer.2 +++ b/lib/libc/sys/getitimer.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getitimer.2,v 1.5 1995/02/27 12:33:00 cgd Exp $ +.\" $NetBSD: getitimer.2,v 1.6 1995/10/12 15:40:54 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -48,7 +48,7 @@ .Ft int .Fn getitimer "int which" "struct itimerval *value" .Ft int -.Fn setitimer "int which" "struct itimerval *value" "struct itimerval *ovalue" +.Fn setitimer "int which" "const struct itimerval *value" "struct itimerval *ovalue" .Sh DESCRIPTION The system provides each process with three interval timers, defined in diff --git a/lib/libc/sys/getpeername.2 b/lib/libc/sys/getpeername.2 index e1461d2ee63..6d5738014ee 100644 --- a/lib/libc/sys/getpeername.2 +++ b/lib/libc/sys/getpeername.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getpeername.2,v 1.5 1995/02/27 12:33:06 cgd Exp $ +.\" $NetBSD: getpeername.2,v 1.6 1995/10/12 15:40:56 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -40,6 +40,7 @@ .Nm getpeername .Nd get name of connected peer .Sh SYNOPSIS +.Fd #include .Ft int .Fn getpeername "int s" "struct sockaddr *name" "int *namelen" .Sh DESCRIPTION diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2 index c0b8a517395..33b956bb1f2 100644 --- a/lib/libc/sys/getrlimit.2 +++ b/lib/libc/sys/getrlimit.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getrlimit.2,v 1.7 1995/02/27 12:33:19 cgd Exp $ +.\" $NetBSD: getrlimit.2,v 1.8 1995/10/12 15:40:58 jtc Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -47,7 +47,7 @@ .Ft int .Fn getrlimit "int resource" "struct rlimit *rlp" .Ft int -.Fn setrlimit "int resource" "struct rlimit *rlp" +.Fn setrlimit "int resource" "const struct rlimit *rlp" .Sh DESCRIPTION Limits on the consumption of system resources by the current process and each process it creates may be obtained with the diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2 index bf78b173119..4582a3ea500 100644 --- a/lib/libc/sys/getsockname.2 +++ b/lib/libc/sys/getsockname.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getsockname.2,v 1.5 1995/02/27 12:33:26 cgd Exp $ +.\" $NetBSD: getsockname.2,v 1.6 1995/10/12 15:41:00 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -40,6 +40,7 @@ .Nm getsockname .Nd get socket name .Sh SYNOPSIS +.Fd #include .Ft int .Fn getsockname "int s" "struct sockaddr *name" "int *namelen" .Sh DESCRIPTION diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2 index 1e3740d3259..98768df1cee 100644 --- a/lib/libc/sys/gettimeofday.2 +++ b/lib/libc/sys/gettimeofday.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: gettimeofday.2,v 1.5 1995/02/27 12:33:33 cgd Exp $ +.\" $NetBSD: gettimeofday.2,v 1.6 1995/10/12 15:41:01 jtc Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -45,7 +45,7 @@ .Ft int .Fn gettimeofday "struct timeval *tp" "struct timezone *tzp" .Ft int -.Fn settimeofday "struct timeval *tp" "struct timezone *tzp" +.Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp" .Sh DESCRIPTION .Bf -symbolic Note: timezone is no longer used; this information is kept outside diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2 index ae844c350f0..e7155637a99 100644 --- a/lib/libc/sys/madvise.2 +++ b/lib/libc/sys/madvise.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: madvise.2,v 1.5 1995/02/27 12:34:13 cgd Exp $ +.\" $NetBSD: madvise.2,v 1.6 1995/10/12 15:41:03 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fd #include .Fd #include .Ft int -.Fn madvise "caddr_t addr" "int len" "int behav" +.Fn madvise "caddr_t addr" "size_t len" "int behav" .Sh DESCRIPTION The .Fn madvise diff --git a/lib/libc/sys/mincore.2 b/lib/libc/sys/mincore.2 index f5dd093e234..f8aa4bc0058 100644 --- a/lib/libc/sys/mincore.2 +++ b/lib/libc/sys/mincore.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: mincore.2,v 1.6 1995/06/24 10:47:05 cgd Exp $ +.\" $NetBSD: mincore.2,v 1.7 1995/10/12 15:41:05 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fd #include .Fd #include .Ft int -.Fn mincore "caddr_t addr" "int len" "char *vec" +.Fn mincore "caddr_t addr" "size_t len" "char *vec" .Sh DESCRIPTION The .Fn mincore diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2 index 15b9b0ad472..4c00bff8434 100644 --- a/lib/libc/sys/mount.2 +++ b/lib/libc/sys/mount.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount.2,v 1.8.2.1 1995/11/01 00:06:16 jtc Exp $ +.\" $NetBSD: mount.2,v 1.10 1995/11/28 06:41:53 jtc Exp $ .\" .\" Copyright (c) 1980, 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,7 @@ .Fd #include .Fd #include .Ft int -.Fn mount "int type" "const char *dir" "int flags" "caddr_t data" +.Fn mount "char *type" "const char *dir" "int flags" "void *data" .Ft int .Fn unmount "const char *dir" "int flags" .Sh DESCRIPTION diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2 index 03d95872bc4..69a3d28defd 100644 --- a/lib/libc/sys/mprotect.2 +++ b/lib/libc/sys/mprotect.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: mprotect.2,v 1.5 1995/02/27 12:34:56 cgd Exp $ +.\" $NetBSD: mprotect.2,v 1.6 1995/10/12 15:41:08 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fd #include .Fd #include .Ft int -.Fn mprotect "caddr_t addr" "int len" "int prot" +.Fn mprotect "caddr_t addr" "size_t len" "int prot" .Sh DESCRIPTION The .Fn mprotect diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2 index 6a90907d6ae..7feb4369ccd 100644 --- a/lib/libc/sys/msync.2 +++ b/lib/libc/sys/msync.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: msync.2,v 1.7 1995/02/27 10:41:44 cgd Exp $ +.\" $NetBSD: msync.2,v 1.8 1995/10/12 15:41:09 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -40,7 +40,10 @@ .Nm msync .Nd synchronize a mapped region .Sh SYNOPSIS -.Fn msync "caddr_t addr" "int len" +.Fd #include +.Fd #include +.Ft int +.Fn msync "caddr_t addr" "size_t len" .Sh DESCRIPTION The .Fn msync diff --git a/lib/libc/sys/profil.2 b/lib/libc/sys/profil.2 index 8950d7dbf3a..1463403c385 100644 --- a/lib/libc/sys/profil.2 +++ b/lib/libc/sys/profil.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: profil.2,v 1.2 1995/02/27 12:35:32 cgd Exp $ +.\" $NetBSD: profil.2,v 1.3 1995/11/22 23:07:23 cgd Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,7 @@ .Nd control process profiling .Sh SYNOPSIS .Ft int -.Fn profil "char *samples" "int size" "int offset" "int scale" +.Fn profil "char *samples" "size_t size" "u_long offset" "u_int scale" .Sh DESCRIPTION The .Fn profil diff --git a/lib/libc/sys/revoke.2 b/lib/libc/sys/revoke.2 index 004eb84617a..00d09917139 100644 --- a/lib/libc/sys/revoke.2 +++ b/lib/libc/sys/revoke.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: revoke.2,v 1.2 1995/02/27 12:36:23 cgd Exp $ +.\" $NetBSD: revoke.2,v 1.3 1995/10/12 15:41:11 jtc Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,8 +43,9 @@ .Nm revoke .Nd revoke file access .Sh SYNOPSIS +.Fd #include .Ft int -.Fn revoke "char *path" +.Fn revoke "const char *path" .Sh DESCRIPTION The .Nm revoke diff --git a/lib/libc/sys/setsid.2 b/lib/libc/sys/setsid.2 index e4be5f7cebe..756a32a3871 100644 --- a/lib/libc/sys/setsid.2 +++ b/lib/libc/sys/setsid.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: setsid.2,v 1.2 1995/02/27 12:37:00 cgd Exp $ +.\" $NetBSD: setsid.2,v 1.3 1995/10/12 15:41:13 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -41,6 +41,7 @@ .Nd create session and set process group ID .Sh SYNOPSIS .Fd #include +.Fd #include .Ft pid_t .Fn setsid "void" .Sh DESCRIPTION diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index dc038623c01..e1458bc1a04 100644 --- a/lib/libc/sys/sigaction.2 +++ b/lib/libc/sys/sigaction.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: sigaction.2,v 1.6 1995/02/27 12:37:19 cgd Exp $ +.\" $NetBSD: sigaction.2,v 1.7 1995/10/12 15:41:16 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -49,7 +49,7 @@ struct sigaction { }; .Ed .Ft int -.Fn sigaction "int sig" "struct sigaction *act" "struct sigaction *oact" +.Fn sigaction "int sig" "const struct sigaction *act" "struct sigaction *oact" .Sh DESCRIPTION The system defines a set of signals that may be delivered to a process. Signal delivery resembles the occurrence of a hardware interrupt: