diff options
author | 2011-07-12 18:41:38 +0000 | |
---|---|---|
committer | 2011-07-12 18:41:38 +0000 | |
commit | f79173603be9966730be02f2323c98f9d7e77300 (patch) | |
tree | f5b8de61f08cc9b9638bd13a62d5ea727dde3b46 /lib/libc | |
parent | document O_CLOEXEC and O_DIRECTORY (diff) | |
download | wireguard-openbsd-f79173603be9966730be02f2323c98f9d7e77300.tar.xz wireguard-openbsd-f79173603be9966730be02f2323c98f9d7e77300.zip |
Clarify that exactly one of O_RDONLY, O_WRONLY, and O_RDWR must be
specified when calling open(2).
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/open.2 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index b61e84773fb..7e9ea5dfb50 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: open.2,v 1.37 2011/07/12 18:36:23 matthew Exp $ +.\" $OpenBSD: open.2,v 1.38 2011/07/12 18:41:38 matthew Exp $ .\" $NetBSD: open.2,v 1.8 1995/02/27 12:35:14 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -60,9 +60,10 @@ as described in and modified by the process' umask value (see .Xr umask 2 ) . .Pp -The flags specified are formed by +The flags specified are formed by bitwise-inclusive .Tn OR Ns 'ing -the following values: +the following values. +Exactly one of the first three values (file access modes) must be specified: .Pp .Bl -tag -width O_DIRECTORY -offset indent -compact .It Dv O_RDONLY @@ -71,6 +72,11 @@ Open for reading only. Open for writing only. .It Dv O_RDWR Open for reading and writing. +.El +.Pp +Any combination of the following flags may additionally be used: +.Pp +.Bl -tag -width O_DIRECTORY -offset indent -compact .It Dv O_NONBLOCK Do not block on open or for data to become available. .It Dv O_APPEND |