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



details:   https://anonhg.NetBSD.org/src/rev/72daa52e8b39
branches:  trunk
changeset: 788933:72daa52e8b39
user:      njoly <njoly%NetBSD.org@localhost>
date:      Mon Jul 29 19:18:37 2013 +0000

description:
Add chmodat(2) specific errors.

diffstat:

 lib/libc/sys/chmod.2 |  32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r bb686032d961 -r 72daa52e8b39 lib/libc/sys/chmod.2
--- a/lib/libc/sys/chmod.2      Mon Jul 29 18:37:16 2013 +0000
+++ b/lib/libc/sys/chmod.2      Mon Jul 29 19:18:37 2013 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: chmod.2,v 1.45 2013/01/13 08:15:02 dholland Exp $
+.\"    $NetBSD: chmod.2,v 1.46 2013/07/29 19:18:37 njoly Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)chmod.2    8.1 (Berkeley) 6/4/93
 .\"
-.Dd November 18, 2012
+.Dd July 29, 2013
 .Dt CHMOD 2
 .Os
 .Sh NAME
@@ -175,14 +175,12 @@
 from remaining set-user-id (set-group-id) if they are modified,
 at the expense of a degree of compatibility.
 .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 chmod lchmod fchmod fchmodat
 .Sh ERRORS
-.Fn chmod
+.Fn chmod ,
+.Fn lchmod
 and
-.Fn lchmod
+.Fn fchmodat
 will fail and the file mode will be unchanged if:
 .Bl -tag -width Er
 .It Bq Er EACCES
@@ -223,6 +221,24 @@
 The named file resides on a read-only file system.
 .El
 .Pp
+In addition,
+.Fn fchmodat
+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
+.Pp
 .Fn fchmod
 will fail if:
 .Bl -tag -width Er



Home | Main Index | Thread Index | Old Index