Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys Add openat(2) specific errors.
details: https://anonhg.NetBSD.org/src/rev/bb686032d961
branches: trunk
changeset: 788932:bb686032d961
user: njoly <njoly%NetBSD.org@localhost>
date: Mon Jul 29 18:37:16 2013 +0000
description:
Add openat(2) specific errors.
diffstat:
lib/libc/sys/open.2 | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diffs (60 lines):
diff -r fac4ed267419 -r bb686032d961 lib/libc/sys/open.2
--- a/lib/libc/sys/open.2 Mon Jul 29 17:46:36 2013 +0000
+++ b/lib/libc/sys/open.2 Mon Jul 29 18:37:16 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: open.2,v 1.55 2013/01/13 08:15:02 dholland Exp $
+.\" $NetBSD: open.2,v 1.56 2013/07/29 18:37:16 njoly Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)open.2 8.2 (Berkeley) 11/16/93
.\"
-.Dd November 18, 2012
+.Dd July 29, 2013
.Dt OPEN 2
.Os
.Sh NAME
@@ -288,6 +288,8 @@
.Sh RETURN VALUES
If successful,
.Fn open
+and
+.Fn openat
returns a non-negative integer, termed a file descriptor.
Otherwise, a value of \-1 is returned and
.Va errno
@@ -405,6 +407,24 @@
.Fn open
call requests write access.
.El
+.Pp
+In addition,
+.Fn openat
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+.Fa path
+does not specify an absolute path and
+.Fa fd
+is neither
+.Dv AT_FDCWD
+nor a valid file descriptor open for reading or searching.
+.It Bq Er ENOTDIR
+.Fa path
+is not an absolute path and
+.Fa fd
+is a file descriptor associated with a non-directory file.
+.El
.Sh SEE ALSO
.Xr chmod 2 ,
.Xr close 2 ,
@@ -418,7 +438,6 @@
.Xr mkdirat 2 ,
.Xr mkfifoat 2 ,
.Xr mknodat 2 ,
-.Xr openat 2 ,
.Xr read 2 ,
.Xr readlinkat 2 ,
.Xr symlinkat 2 ,
Home |
Main Index |
Thread Index |
Old Index