summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-12 18:41:39 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-12 18:41:39 +0000
commita694c2b4ac1c425a91e0e228e2f4409a4adfefac (patch)
tree8bec9513f5081affd0c74c59fa92d6cb75b2817b /lib
parented45692ccce37bd3aa7f456ff82b26d4dad2752d (diff)
Clarify that exactly one of O_RDONLY, O_WRONLY, and O_RDWR must be
specified when calling open(2).
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/open.212
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