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 fchownat(2) specific errors.
details: https://anonhg.NetBSD.org/src/rev/1364a83ad7aa
branches: trunk
changeset: 788940:1364a83ad7aa
user: njoly <njoly%NetBSD.org@localhost>
date: Tue Jul 30 12:38:16 2013 +0000
description:
Add fchownat(2) specific errors.
diffstat:
lib/libc/sys/chown.2 | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
diffs (62 lines):
diff -r 7577a1ad2d4e -r 1364a83ad7aa lib/libc/sys/chown.2
--- a/lib/libc/sys/chown.2 Tue Jul 30 10:47:44 2013 +0000
+++ b/lib/libc/sys/chown.2 Tue Jul 30 12:38:16 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: chown.2,v 1.35 2013/01/13 08:15:02 dholland Exp $
+.\" $NetBSD: chown.2,v 1.36 2013/07/30 12:38:16 njoly Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)chown.2 8.4 (Berkeley) 4/19/94
.\"
-.Dd November 18, 2012
+.Dd July 30, 2013
.Dt CHOWN 2
.Os
.Sh NAME
@@ -139,14 +139,12 @@
One of the owner or group id's
may be left unchanged by specifying it as (uid_t)\-1 or (gid_t)\-1 respectively.
.Sh RETURN VALUES
-Zero is returned if the operation was successful;
-\-1 is returned if an error occurs, with a more specific
-error code being placed in the global variable
-.Va errno .
+.Rv -std chown lchown fchown fchownat
.Sh ERRORS
-.Fn chown
+.Fn chown ,
+.Fn lchown
and
-.Fn lchown
+.Fn fchownat
will fail and the file will be unchanged if:
.Bl -tag -width Er
.It Bq Er EACCES
@@ -174,6 +172,24 @@
The named file resides on a read-only file system.
.El
.Pp
+In addition,
+.Fn fchownat
+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 fchown
will fail if:
.Bl -tag -width Er
Home |
Main Index |
Thread Index |
Old Index