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 mkdirat(2) specific errors.



details:   https://anonhg.NetBSD.org/src/rev/883853f48bc3
branches:  trunk
changeset: 788917:883853f48bc3
user:      njoly <njoly%NetBSD.org@localhost>
date:      Sun Jul 28 14:38:25 2013 +0000

description:
Add mkdirat(2) specific errors.

diffstat:

 lib/libc/sys/mkdir.2 |  29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diffs (59 lines):

diff -r d2af6819ac7b -r 883853f48bc3 lib/libc/sys/mkdir.2
--- a/lib/libc/sys/mkdir.2      Sun Jul 28 14:13:29 2013 +0000
+++ b/lib/libc/sys/mkdir.2      Sun Jul 28 14:38:25 2013 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: mkdir.2,v 1.27 2013/01/13 08:15:02 dholland Exp $
+.\"    $NetBSD: mkdir.2,v 1.28 2013/07/28 14:38:25 njoly Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)mkdir.2    8.2 (Berkeley) 12/11/93
 .\"
-.Dd November 18, 2012
+.Dd July 28, 2013
 .Dt MKDIR 2
 .Os
 .Sh NAME
@@ -83,11 +83,12 @@
 The directory's group ID is set to that of the parent directory in
 which it is created.
 .Sh RETURN VALUES
-A 0 return value indicates success.
-A \-1 return value indicates an error, and an error code is stored in
-.Va errno .
+.Rv -std mkdir mkdirat
 .Sh ERRORS
+Both
 .Fn mkdir
+and
+.Fn mkdirat
 will fail and no directory will be created if:
 .Bl -tag -width Er
 .It Bq Er EACCES
@@ -126,6 +127,24 @@
 .It Bq Er EROFS
 The named file resides on a read-only file system.
 .El
+.Pp
+In addition,
+.Fn mkdirat
+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 stat 2 ,



Home | Main Index | Thread Index | Old Index