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



details:   https://anonhg.NetBSD.org/src/rev/e553158eb080
branches:  trunk
changeset: 788943:e553158eb080
user:      njoly <njoly%NetBSD.org@localhost>
date:      Tue Jul 30 13:45:38 2013 +0000

description:
Add mknodat(2) specific errors.

diffstat:

 lib/libc/sys/mknod.2 |  29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 6bcaf6bfb23b -r e553158eb080 lib/libc/sys/mknod.2
--- a/lib/libc/sys/mknod.2      Tue Jul 30 13:15:07 2013 +0000
+++ b/lib/libc/sys/mknod.2      Tue Jul 30 13:45:38 2013 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: mknod.2,v 1.26 2013/01/13 08:15:02 dholland Exp $
+.\"    $NetBSD: mknod.2,v 1.27 2013/07/30 13:45:38 njoly Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)mknod.2    8.1 (Berkeley) 6/4/93
 .\"
-.Dd November 18, 2012
+.Dd July 29, 2013
 .Dt MKNOD 2
 .Os
 .Sh NAME
@@ -87,12 +87,11 @@
 .Fn mknod
 requires super-user privileges.
 .Sh RETURN VALUES
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std mknod mknodat
 .Sh ERRORS
 .Fn mknod
+and
+.Fn mknodat
 will fail and the file will be not created if:
 .Bl -tag -width Er
 .It Bq Er EACCES
@@ -140,6 +139,24 @@
 .It Bq Er EROFS
 The named file resides on a read-only file system.
 .El
+.Pp
+In addition,
+.Fn mknodat
+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 mkfifo 2 ,



Home | Main Index | Thread Index | Old Index