Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/sys - move return values info into RETURN VALUES se...



details:   https://anonhg.NetBSD.org/src/rev/73405b0724b5
branches:  trunk
changeset: 535400:73405b0724b5
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Aug 17 17:25:37 2002 +0000

description:
- move return values info into RETURN VALUES section.
- note that O_SHLOCK and O_EXLOCK are not portable.
from OpenBSD.

diffstat:

 lib/libc/sys/open.2 |  26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diffs (62 lines):

diff -r b24f84597d2f -r 73405b0724b5 lib/libc/sys/open.2
--- a/lib/libc/sys/open.2       Sat Aug 17 16:42:20 2002 +0000
+++ b/lib/libc/sys/open.2       Sat Aug 17 17:25:37 2002 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: open.2,v 1.24 2002/06/13 18:02:38 christos Exp $
+.\"    $NetBSD: open.2,v 1.25 2002/08/17 17:25:37 yamt Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\"     @(#)open.2     8.2 (Berkeley) 11/16/93
 .\"
-.Dd November 16, 1993
+.Dd August 18, 2002
 .Dt OPEN 2
 .Os
 .Sh NAME
@@ -170,12 +170,10 @@
 the request for the lock will never fail
 (provided that the underlying filesystem supports locking).
 .Pp
-If successful,
+If
 .Fn open
-returns a non-negative integer, termed a file descriptor.
-It returns -1 on failure.
-The file pointer used to mark the current position within the
-file is set to the beginning of the file.
+is successful, the file pointer used to mark the current position within
+the file is set to the beginning of the file.
 .Pp
 When a new file is created it is given the group of the directory
 which contains it.
@@ -192,6 +190,13 @@
 Calling
 .Xr getdtablesize 3
 returns the current system limit.
+.Sh RETURN VALUES
+If successful,
+.Fn open
+returns a non-negative integer, termed a file descriptor.
+Otherwise, a value of -1 is returned and
+.Va errno
+is set to indicate the error.
 .Sh ERRORS
 The named file is opened unless:
 .Bl -tag -width Er
@@ -317,6 +322,13 @@
 .Dv O_RSYNC
 are extensions defined in
 .St -p1003.1b-93 .
+.Pp
+The
+.Dv O_SHLOCK
+and
+.Dv O_EXLOCK
+flags are non-standard extensions and should not be used if portability
+is of concern.
 .Sh HISTORY
 An
 .Fn open



Home | Main Index | Thread Index | Old Index