diff options
-rw-r--r-- | lib/libc/sys/access.2 | 23 | ||||
-rw-r--r-- | lib/libc/sys/chmod.2 | 28 | ||||
-rw-r--r-- | lib/libc/sys/dup.2 | 6 | ||||
-rw-r--r-- | lib/libc/sys/getgid.2 | 7 | ||||
-rw-r--r-- | lib/libc/sys/getgroups.2 | 10 | ||||
-rw-r--r-- | lib/libc/sys/getlogin.2 | 42 | ||||
-rw-r--r-- | lib/libc/sys/getpgrp.2 | 44 | ||||
-rw-r--r-- | lib/libc/sys/getpid.2 | 7 | ||||
-rw-r--r-- | lib/libc/sys/getsid.2 | 8 | ||||
-rw-r--r-- | lib/libc/sys/getuid.2 | 7 | ||||
-rw-r--r-- | lib/libc/sys/kill.2 | 18 | ||||
-rw-r--r-- | lib/libc/sys/madvise.2 | 16 | ||||
-rw-r--r-- | lib/libc/sys/mknod.2 | 14 | ||||
-rw-r--r-- | lib/libc/sys/mlock.2 | 9 | ||||
-rw-r--r-- | lib/libc/sys/mlockall.2 | 16 | ||||
-rw-r--r-- | lib/libc/sys/open.2 | 16 | ||||
-rw-r--r-- | lib/libc/sys/pipe.2 | 6 | ||||
-rw-r--r-- | lib/libc/sys/stat.2 | 54 | ||||
-rw-r--r-- | lib/libc/sys/sync.2 | 9 | ||||
-rw-r--r-- | lib/libc/sys/umask.2 | 8 |
20 files changed, 216 insertions, 132 deletions
diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 92080c0c131..fee8a9470d7 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: access.2,v 1.19 2012/01/15 21:03:05 schwarze Exp $ +.\" $OpenBSD: access.2,v 1.20 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: access.2,v 1.7 1995/02/27 12:31:44 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd $Mdocdate: January 15 2012 $ +.Dd $Mdocdate: March 30 2013 $ .Dt ACCESS 2 .Os .Sh NAME @@ -38,10 +38,10 @@ .Nm faccessat .Nd check access permissions of a file or pathname .Sh SYNOPSIS -.Fd #include <fcntl.h> .Fd #include <unistd.h> .Ft int .Fn access "const char *path" "int amode" +.Fd #include <fcntl.h> .Ft int .Fn faccessat "int fd" "const char *path" "int amode" "int flag" .Sh DESCRIPTION @@ -183,11 +183,24 @@ will fail if: .It Bq Er EBADF The .Fa path -argument does not specify an absolute path and the +argument specifies a relative path and the .Fa fd argument is neither .Dv AT_FDCWD -nor a valid file descriptor open for reading. +nor a valid file descriptor. +.It Bq Er ENOTDIR +The +.Fa path +argument specifies a relative path and the +.Fa fd +argument is a valid file descriptor but it does not reference a directory. +.It Bq Er EACCES +The +.Fa path +argument specifies a relative path but search permission is denied +for the directory which the +.Fa fd +file descriptor references. .El .Sh SEE ALSO .Xr chmod 2 , diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index 130f65be918..32758b0d53f 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chmod.2,v 1.19 2011/11/07 11:24:30 schwarze Exp $ +.\" $OpenBSD: chmod.2,v 1.20 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: chmod.2,v 1.7 1995/02/27 12:32:06 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: November 7 2011 $ +.Dd $Mdocdate: March 30 2013 $ .Dt CHMOD 2 .Os .Sh NAME @@ -39,15 +39,14 @@ .Nm fchmod .Nd change mode of file .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <sys/stat.h> -.Fd #include <fcntl.h> .Ft int .Fn chmod "const char *path" "mode_t mode" .Ft int -.Fn fchmodat "int fd" "const char *path" "mode_t mode" "int flag" -.Ft int .Fn fchmod "int fd" "mode_t mode" +.Fd #include <fcntl.h> +.Ft int +.Fn fchmodat "int fd" "const char *path" "mode_t mode" "int flag" .Sh DESCRIPTION The .Fn chmod @@ -204,11 +203,24 @@ function will fail if: .It Bq Er EBADF The .Fa path -argument does not specify an absolute path and the +argument specifies a relative path and the .Fa fd argument is neither .Dv AT_FDCWD -nor a valid file descriptor open for reading. +nor a valid file descriptor. +.It Bq Er ENOTDIR +The +.Fa path +argument specifies a relative path and the +.Fa fd +argument is a valid file descriptor but it does not reference a directory. +.It Bq Er EACCES +The +.Fa path +argument specifies a relative path but search permission is denied +for the directory which the +.Fa fd +file descriptor references. .El .Pp .Fn fchmod diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2 index 5696dbc7b99..19ce34b511f 100644 --- a/lib/libc/sys/dup.2 +++ b/lib/libc/sys/dup.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dup.2,v 1.13 2007/05/31 19:19:32 jmc Exp $ +.\" $OpenBSD: dup.2,v 1.14 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: dup.2,v 1.4 1995/02/27 12:32:21 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)dup.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt DUP 2 .Os .Sh NAME @@ -130,4 +130,4 @@ Too many descriptors are active. and .Fn dup2 are expected to conform to -.St -p1003.1-88 . +.St -p1003.1-2008 . diff --git a/lib/libc/sys/getgid.2 b/lib/libc/sys/getgid.2 index 9d62af41805..61f42189211 100644 --- a/lib/libc/sys/getgid.2 +++ b/lib/libc/sys/getgid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getgid.2,v 1.16 2008/08/04 07:08:23 jmc Exp $ +.\" $OpenBSD: getgid.2,v 1.17 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: getgid.2,v 1.5 1995/02/27 12:32:53 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)getgid.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: August 4 2008 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETGID 2 .Os .Sh NAME @@ -38,7 +38,6 @@ .Nm getegid .Nd get group process identification .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <unistd.h> .Ft gid_t .Fn getgid void @@ -79,4 +78,4 @@ The and .Fn getegid functions conform to -.St -p1003.1-88 . +.St -p1003.1-2008 . diff --git a/lib/libc/sys/getgroups.2 b/lib/libc/sys/getgroups.2 index 61567978269..f6488e96ed3 100644 --- a/lib/libc/sys/getgroups.2 +++ b/lib/libc/sys/getgroups.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getgroups.2,v 1.11 2008/08/04 07:08:23 jmc Exp $ +.\" $OpenBSD: getgroups.2,v 1.12 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: getgroups.2,v 1.8 1995/02/27 12:32:57 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,14 +30,13 @@ .\" .\" @(#)getgroups.2 8.2 (Berkeley) 4/16/94 .\" -.Dd $Mdocdate: August 4 2008 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETGROUPS 2 .Os .Sh NAME .Nm getgroups .Nd get group access list .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <unistd.h> .Ft int .Fn getgroups "int gidsetlen" "gid_t *gidset" @@ -88,6 +87,11 @@ specifies an invalid address. .Xr setgid 2 , .Xr setgroups 2 , .Xr initgroups 3 +.Sh STANDARDS +The +.Fn getgroups +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn getgroups diff --git a/lib/libc/sys/getlogin.2 b/lib/libc/sys/getlogin.2 index 9c8c4d9badb..4c63081148f 100644 --- a/lib/libc/sys/getlogin.2 +++ b/lib/libc/sys/getlogin.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getlogin.2,v 1.19 2011/11/06 12:07:42 deraadt Exp $ +.\" $OpenBSD: getlogin.2,v 1.20 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: getlogin.2,v 1.4 1995/02/27 12:33:03 cgd Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 @@ -30,11 +30,12 @@ .\" .\" @(#)getlogin.2 8.1 (Berkeley) 6/9/93 .\" -.Dd $Mdocdate: November 6 2011 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETLOGIN 2 .Os .Sh NAME .Nm getlogin , +.Nm getlogin_r , .Nm setlogin .Nd get/set login name .Sh SYNOPSIS @@ -148,32 +149,51 @@ fails, a value of \-1 is returned and an error code is placed in the global location .Va errno . .Sh ERRORS -The following errors may be returned by these calls: +.Fn getlogin_r +and +.Fn setlogin +will succeed unless: .Bl -tag -width Er .It Bq Er EFAULT The .Fa name -parameter gave an +parameter points to an invalid address. +.El +.Pp +In addition, +.Fn getlogin_r +may return the following error: +.Bl -tag -width Er +.It Bq Er ERANGE +The value of +.Fa namelen +is not large enough to store the user's login name and a trailing NUL. +.El +.Pp +.Fn setlogin +may return the following errors: +.Bl -tag -width Er .It Bq Er EINVAL The .Fa name parameter pointed to a string that was too long. Login names are limited to -.Dv MAXLOGNAME-1 -(from -.Ao Pa sys/param.h Ac ) +.Dv LOGIN_NAME_MAX-1 characters, currently 31. .It Bq Er EPERM The caller tried to set the login name and was not the superuser. -.It Bq Er ERANGE -The buffer passed to -.Fn getlogin_r -is not large enough to store the user's login name. .El .Sh SEE ALSO .Xr setsid 2 +.Sh STANDARDS +The +.Fn getlogin +and +.Fn getlogin_r +functions conform to +.St -p1003.1-2008 . .Sh HISTORY The .Fn getlogin diff --git a/lib/libc/sys/getpgrp.2 b/lib/libc/sys/getpgrp.2 index b2d95ca32c9..e73fbdba668 100644 --- a/lib/libc/sys/getpgrp.2 +++ b/lib/libc/sys/getpgrp.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getpgrp.2,v 1.15 2012/06/26 21:27:44 tedu Exp $ +.\" $OpenBSD: getpgrp.2,v 1.16 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: getpgrp.2,v 1.8 1995/02/27 12:33:09 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)getpgrp.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: June 26 2012 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETPGRP 2 .Os .Sh NAME @@ -93,37 +93,23 @@ There is no process with a process ID equal to .Sh STANDARDS The .Fn getpgrp -function conforms to -.St -p1003.1-88 , -but differs from past Berkeley versions by not taking a -.Fa "pid_t pid" -argument. -.Pp -From the -.St -p1003.1-88 -Rationale: -.Pp -.Bx 4.3 -provides a -.Fn getpgrp -function that returns the process group ID for a specified process. -Although this function is used to support job control, all known -job-control shells always specify the calling process with this -function. -Thus, the simpler System V -.Fn getpgrp -suffices, and the added complexity of the -.Bx 4.3 +and +.Fn getpgid +functions conform to +.St -p1003.1-2008 . +.Sh HISTORY +A .Fn getpgrp -has been omitted from POSIX.1. +function call that took a +.Fa "pid_t pid" +argument appeared in +.Bx 4.0 . +This version without an argument is derived from its usage in +System V Release 4, and first appeared in +.Nx 0.9 . .Pp The .Fn getpgid function call is derived from its usage in System V Release 4, and first appeared in .Nx 1.2a . -.Sh HISTORY -The -.Fn getpgrp -function call appeared in -.Bx 4.0 . diff --git a/lib/libc/sys/getpid.2 b/lib/libc/sys/getpid.2 index 5933a369556..069d49c748e 100644 --- a/lib/libc/sys/getpid.2 +++ b/lib/libc/sys/getpid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getpid.2,v 1.11 2007/05/31 19:19:32 jmc Exp $ +.\" $OpenBSD: getpid.2,v 1.12 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: getpid.2,v 1.5 1995/02/27 12:33:12 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)getpid.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETPID 2 .Os .Sh NAME @@ -38,7 +38,6 @@ .Nm getppid .Nd get parent or calling process identification .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <unistd.h> .Ft pid_t .Fn getpid void @@ -65,4 +64,4 @@ reserved to indicate an error. and .Fn getppid conform to -.St -p1003.1-88 . +.St -p1003.1-2008 . diff --git a/lib/libc/sys/getsid.2 b/lib/libc/sys/getsid.2 index 0ea43ffd6cb..c8fce2ca71e 100644 --- a/lib/libc/sys/getsid.2 +++ b/lib/libc/sys/getsid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getsid.2,v 1.10 2007/05/31 19:19:32 jmc Exp $ +.\" $OpenBSD: getsid.2,v 1.11 2013/03/30 06:44:44 guenther Exp $ .\" .\" Copyright (c) 1997 Peter Wemm <peter@freebsd.org> .\" @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETSID 2 .Os .Sh NAME @@ -70,6 +70,10 @@ There is no process with a process ID equal to .Xr setpgid 2 , .Xr setsid 2 , .Xr termios 4 +.Sh STANDARDS +.Fn getsid +conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn getsid diff --git a/lib/libc/sys/getuid.2 b/lib/libc/sys/getuid.2 index 0e4bdf635c1..74f4641191b 100644 --- a/lib/libc/sys/getuid.2 +++ b/lib/libc/sys/getuid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getuid.2,v 1.14 2011/11/17 14:26:14 schwarze Exp $ +.\" $OpenBSD: getuid.2,v 1.15 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: getuid.2,v 1.6 1995/02/27 12:33:37 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)getuid.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: November 17 2011 $ +.Dd $Mdocdate: March 30 2013 $ .Dt GETUID 2 .Os .Sh NAME @@ -38,7 +38,6 @@ .Nm geteuid .Nd get user identification .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <unistd.h> .Ft uid_t .Fn getuid void @@ -78,7 +77,7 @@ The and .Fn geteuid functions conform to -.St -p1003.1-88 . +.St -p1003.1-2008 . .Sh HISTORY The .Fn getuid diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2 index 492cb4097e5..b7e8d00429e 100644 --- a/lib/libc/sys/kill.2 +++ b/lib/libc/sys/kill.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: kill.2,v 1.17 2007/05/31 19:19:32 jmc Exp $ +.\" $OpenBSD: kill.2,v 1.18 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: kill.2,v 1.7 1995/02/27 12:33:53 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)kill.2 8.3 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt KILL 2 .Os .Sh NAME @@ -126,9 +126,6 @@ is not a valid signal number. .It Bq Er ESRCH No process can be found corresponding to that specified by .Fa pid . -.It Bq Er ESRCH -The process ID was given as 0 -but the sending process does not have a process group. .It Bq Er EPERM The sending process is not the superuser and its effective user ID does not match the effective user ID of the receiving process. @@ -145,4 +142,13 @@ of the group could not be signaled. The .Fn kill function is expected to conform to -.St -p1003.1-88 . +.St -p1003.1-2008 . +.Sh BUGS +.St -p1003.1-2008 +specifies that +.Fn kill 0 sig +should send signal +.Fa sig +to the calling process, but +.Ox +doesn't do so for historical reasons. diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2 index 5f62531721e..97d67426985 100644 --- a/lib/libc/sys/madvise.2 +++ b/lib/libc/sys/madvise.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: madvise.2,v 1.16 2010/05/19 06:32:43 jmc Exp $ +.\" $OpenBSD: madvise.2,v 1.17 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: madvise.2,v 1.7 1995/12/27 21:17:02 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" -.Dd $Mdocdate: May 19 2010 $ +.Dd $Mdocdate: March 30 2013 $ .Dt MADVISE 2 .Os .Sh NAME @@ -94,9 +94,8 @@ is set to indicate the error. .Sh STANDARDS The .Fn posix_madvise -system call is expected to conform to the -.St -p1003.1-2001 -standard. +system call conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Nm madvise @@ -106,3 +105,10 @@ The .Nm posix_madvise function first appeared in .Ox 4.8 . +.Sh BUGS +The +.Dv MADV_WILLNEED +behavior is ignored. +The +.Dv MADV_SPACEAVAIL +behavior is not implemented and will always fail. diff --git a/lib/libc/sys/mknod.2 b/lib/libc/sys/mknod.2 index 02b6627c64f..81079bac018 100644 --- a/lib/libc/sys/mknod.2 +++ b/lib/libc/sys/mknod.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mknod.2,v 1.14 2011/07/19 07:06:22 jmc Exp $ +.\" $OpenBSD: mknod.2,v 1.15 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: mknod.2,v 1.6 1995/02/27 12:34:33 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)mknod.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: July 19 2011 $ +.Dd $Mdocdate: March 30 2013 $ .Dt MKNOD 2 .Os .Sh NAME @@ -39,9 +39,9 @@ .Nd make a special file node .Sh SYNOPSIS .Fd #include <sys/stat.h> -.Fd #include <fcntl.h> .Ft int .Fn mknod "const char *path" "mode_t mode" "dev_t dev" +.Fd #include <fcntl.h> .Ft int .Fn mknodat "int fd" "const char *path" "mode_t mode" "dev_t dev" .Sh DESCRIPTION @@ -150,6 +150,7 @@ The process is running within an alternate root directory, as created by .Xr chroot 2 . .El +.Pp Additionally, .Fn mknodat will fail if: @@ -168,6 +169,13 @@ nor a valid file descriptor open for reading. .Xr chroot 2 , .Xr stat 2 , .Xr umask 2 +.Sh STANDARDS +The +.Fn mknod +and +.Fn mknodat +functions conform to +.St -p1003.1-2008 . .Sh HISTORY A .Fn mknod diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2 index a183cab8e40..02a2beb4dd4 100644 --- a/lib/libc/sys/mlock.2 +++ b/lib/libc/sys/mlock.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mlock.2,v 1.16 2007/05/31 19:19:33 jmc Exp $ +.\" $OpenBSD: mlock.2,v 1.17 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: mlock.2,v 1.3 1995/06/24 10:42:03 cgd Exp $ .\" .\" Copyright (c) 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt MLOCK 2 .Os .Sh NAME @@ -38,12 +38,11 @@ .Nm munlock .Nd lock (unlock) physical pages in memory .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <sys/mman.h> .Ft int -.Fn mlock "void *addr" "size_t len" +.Fn mlock "const void *addr" "size_t len" .Ft int -.Fn munlock "void *addr" "size_t len" +.Fn munlock "const void *addr" "size_t len" .Sh DESCRIPTION The .Nm mlock diff --git a/lib/libc/sys/mlockall.2 b/lib/libc/sys/mlockall.2 index 8b620c5ad59..716299bfd5c 100644 --- a/lib/libc/sys/mlockall.2 +++ b/lib/libc/sys/mlockall.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mlockall.2,v 1.5 2008/06/26 05:42:05 ray Exp $ +.\" $OpenBSD: mlockall.2,v 1.6 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: mlockall.2,v 1.6 2000/06/26 17:00:02 kleink Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 26 2008 $ +.Dd $Mdocdate: March 30 2013 $ .Dt MLOCKALL 2 .Os .Sh NAME @@ -37,7 +37,6 @@ .Nm munlockall .Nd lock (unlock) the address space of a process .Sh SYNOPSIS -.Fd #include <sys/types.h> .Fd #include <sys/mman.h> .Ft int .Fn mlockall "int flags" @@ -91,13 +90,10 @@ will fail if: .It Bq Er EINVAL The .Ar flags -argument is zero or includes unimplemented flags or -.Fa addr -and -.Fa size -specify a region that would extend beyond the end of the address space. +argument is zero or includes unimplemented flags. .It Bq Er ENOMEM -Locking the indicated range would exceed either the system or per-process +Locking the all of the pages currently mapped would exceed either +the system or per-process limit for locked memory. .It Bq Er EAGAIN Some or all of the memory mapped into the process's address space @@ -118,7 +114,7 @@ The and .Fn munlockall functions conform to -.St -p1003.1b-93 . +.St -p1003.1-2008 . .Sh HISTORY The .Fn mlockall diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index f8f32a8ee80..2e1e373d0c5 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: open.2,v 1.42 2013/01/19 07:57:21 jmc Exp $ +.\" $OpenBSD: open.2,v 1.43 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: open.2,v 1.8 1995/02/27 12:35:14 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" -.Dd $Mdocdate: January 19 2013 $ +.Dd $Mdocdate: March 30 2013 $ .Dt OPEN 2 .Os .Sh NAME @@ -40,9 +40,9 @@ .Sh SYNOPSIS .Fd #include <fcntl.h> .Ft int -.Fn open "const char *path" "int flags" "mode_t mode" +.Fn open "const char *path" "int flags" ... .Ft int -.Fn openat "int fd" "const char *path" "int flags" "mode_t mode" +.Fn openat "int fd" "const char *path" "int flags" ... .Sh DESCRIPTION The file name specified by .Fa path @@ -56,8 +56,9 @@ The argument may indicate the file is to be created if it does not exist (by specifying the .Dv O_CREAT -flag), in which case the file is created with mode -.Fa mode +flag), in which case the file is created with a mode +specified by an additional argument of type +.Vt mode_t as described in .Xr chmod 2 and modified by the process' umask value (see @@ -87,6 +88,9 @@ Do not block on open or for data to become available. Append on each write. .It Dv O_CREAT Create file if it does not exist. +An additional argument of type +.Vt mode_t +must be supplied to the call. .It Dv O_TRUNC Truncate size to 0. .It Dv O_EXCL diff --git a/lib/libc/sys/pipe.2 b/lib/libc/sys/pipe.2 index a965443cd9b..b0a22f4915c 100644 --- a/lib/libc/sys/pipe.2 +++ b/lib/libc/sys/pipe.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pipe.2,v 1.13 2007/05/31 19:19:33 jmc Exp $ +.\" $OpenBSD: pipe.2,v 1.14 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: pipe.2,v 1.6 1995/02/27 12:35:27 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)pipe.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt PIPE 2 .Os .Sh NAME @@ -98,7 +98,7 @@ buffer is in an invalid area of the process's address space. The .Fn pipe function conforms to -.St -p1003.1-88 . +.St -p1003.1-2008 . .Pp As an extension, the pipe provided is actually capable of moving data bidirectionally. diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index 7aced710a66..67e1c9c550f 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: stat.2,v 1.32 2012/07/17 07:48:47 matthew Exp $ +.\" $OpenBSD: stat.2,v 1.33 2013/03/30 06:44:44 guenther Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)stat.2 8.3 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: July 17 2012 $ +.Dd $Mdocdate: March 30 2013 $ .Dt STAT 2 .Os .Sh NAME @@ -306,7 +306,11 @@ characters, or an entire path name exceeded .Dv PATH_MAX characters. .It Bq Er ENOENT -The named file does not exist. +A component of +.Em name +does not exist or +.Em name +is the empty path. .It Bq Er EACCES Search permission is denied for a component of the path prefix. .It Bq Er ELOOP @@ -324,14 +328,32 @@ Additionally, .Fn fstatat will fail if: .Bl -tag -width Er +.It Bq Er EINVAL +The value of the +.Fa flag +argument was neither zero nor +.Dv AT_SYMLINK_NOFOLLOW . .It Bq Er EBADF The .Fa path -argument does not specify an absolute path and the +argument specifies a relative path and the .Fa fd argument is neither .Dv AT_FDCWD -nor a valid file descriptor open for reading. +nor a valid file descriptor. +.It Bq Er ENOTDIR +The +.Fa path +argument specifies a relative path and the +.Fa fd +argument is a valid file descriptor but it does not reference a directory. +.It Bq Er EACCES +The +.Fa path +argument specifies a relative path but search permission is denied +for the directory which the +.Fa fd +file descriptor references. .El .Pp .Fn fstat @@ -344,7 +366,7 @@ is not a valid open file descriptor. .Fa sb points to an invalid address. .It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. +An I/O error occurred while reading from the file system. .El .Sh SEE ALSO .Xr chmod 2 , @@ -364,13 +386,13 @@ and fields. .Pp The -.Fn stat , -.Fn lstat , +.Fn fstat , .Fn fstatat , +.Fn lstat , and -.Fn fstat -function calls are expected to conform to -.St -p1003.1-88 . +.Fn stat +functions are intended to conform to +.St -p1003.1-2008 . .Sh HISTORY The .Fn stat @@ -409,7 +431,9 @@ broke them irrevocably. .Sh BUGS Applying .Fn fstat -to a socket (and thus to a pipe) -returns a zeroed buffer, -except for the blocksize field, -and a unique device and inode number. +to a pipe or socket +fails to fill in a unique device and inode number pair. +Applying +.Fn fstat +to a socket +also fails to fill in the time fields. diff --git a/lib/libc/sys/sync.2 b/lib/libc/sys/sync.2 index b366fecf5f6..c8a4462314b 100644 --- a/lib/libc/sys/sync.2 +++ b/lib/libc/sys/sync.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sync.2,v 1.12 2011/04/29 07:12:44 jmc Exp $ +.\" $OpenBSD: sync.2,v 1.13 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: sync.2,v 1.4 1995/02/27 12:38:41 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)sync.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: April 29 2011 $ +.Dd $Mdocdate: March 30 2013 $ .Dt SYNC 2 .Os .Sh NAME @@ -58,6 +58,11 @@ may be used to synchronize individual file descriptor attributes. .Sh SEE ALSO .Xr fsync 2 , .Xr sync 8 +.Sh STANDARDS +The +.Fn sync +function conforms to +.St -p1003.1-2008 . .Sh HISTORY A .Fn sync diff --git a/lib/libc/sys/umask.2 b/lib/libc/sys/umask.2 index 83402e503eb..ea3805a3faf 100644 --- a/lib/libc/sys/umask.2 +++ b/lib/libc/sys/umask.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: umask.2,v 1.8 2007/05/31 19:19:34 jmc Exp $ +.\" $OpenBSD: umask.2,v 1.9 2013/03/30 06:44:44 guenther Exp $ .\" $NetBSD: umask.2,v 1.6 1995/02/27 12:39:06 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)umask.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: March 30 2013 $ .Dt UMASK 2 .Os .Sh NAME @@ -78,5 +78,5 @@ function is always successful. .Sh STANDARDS The .Fn umask -function call is expected to conform to -.St -p1003.1-88 . +function conforms to +.St -p1003.1-2008 . |