Subject: lib/26536: Understanding open(2)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <mishka@apk.od.ua>
List: netbsd-bugs
Date: 08/03/2004 19:06:35
>Number: 26536
>Category: lib
>Synopsis: Manual page for open(2) bit difficult to understand.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 03 16:07:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Mike M. Volokhov
>Release: NetBSD 2.0G
>Organization:
Insakharprom-K, Ltd.
>Environment:
System: NetBSD nostromo.holding.local 2.0G NetBSD 2.0G (GENERIC) #0: Mon Aug 2 14:17:32 EEST 2004 mishka@nostromo.holding.local:/build/netbsd/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Greetings.
On man page for open(2) system call we have the following:
int
open(const char *path, int flags, mode_t mode);
Applications must specify exactly one of the first
three values (file access modes):
The phrase "file access modes" looks unclean for newbies because
they link "access modes" within third argument of open -
"mode_t mode", and manual does not explain a "mode_t mode" at the
very beginning of description section.
>How-To-Repeat:
Please read open(2) manual page (synopsis and first paragraph of
description section).
>Fix:
I think "file access modes" phrase will look bit clean in that
context as "file access conditions". My patch below fixes this
and adds another good spelling around patched line.
Index: open.2
===================================================================
RCS file: /cvsroot/src/lib/libc/sys/open.2,v
retrieving revision 1.32
diff -u -r1.32 open.2
--- open.2 7 Aug 2003 16:44:03 -0000 1.32
+++ open.2 3 Aug 2004 15:51:15 -0000
@@ -53,9 +53,9 @@
.Fa flags
are specified by
.Em or Ns 'ing
-the following values.
+values listed below.
Applications must specify exactly one of the first three values
-(file access modes):
+(file access conditions):
.Bl -tag -offset indent -width O_NONBLOCK
.It Dv O_RDONLY
Open for reading only.
--
Best wishes,
Mishka.
>Release-Note:
>Audit-Trail:
>Unformatted: