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



details:   https://anonhg.NetBSD.org/src/rev/5c9ee8fb16e5
branches:  trunk
changeset: 788918:5c9ee8fb16e5
user:      njoly <njoly%NetBSD.org@localhost>
date:      Sun Jul 28 15:46:34 2013 +0000

description:
Add fstatat(2) specific errors.

diffstat:

 lib/libc/sys/stat.2 |  34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diffs (77 lines):

diff -r 883853f48bc3 -r 5c9ee8fb16e5 lib/libc/sys/stat.2
--- a/lib/libc/sys/stat.2       Sun Jul 28 14:38:25 2013 +0000
+++ b/lib/libc/sys/stat.2       Sun Jul 28 15:46:34 2013 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: stat.2,v 1.54 2013/01/13 08:15:02 dholland Exp $
+.\"    $NetBSD: stat.2,v 1.55 2013/07/28 15:46:34 njoly Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)stat.2     8.4 (Berkeley) 5/1/95
 .\"
-.Dd November 18, 2012
+.Dd July 28, 2013
 .Dt STAT 2
 .Os
 .Sh NAME
@@ -303,10 +303,7 @@
 For a description of the flags, see
 .Xr chflags 2 .
 .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 stat lstat fstat fstatat
 .Sh COMPATIBILITY
 Previous versions of the system used different types for the
 .Li st_dev ,
@@ -319,9 +316,10 @@
 .Li st_blocks
 fields.
 .Sh ERRORS
-.Fn stat
+.Fn stat ,
+.Fn lstat
 and
-.Fn lstat
+.Fn fstatat
 will fail if:
 .Bl -tag -width Er
 .It Bq Er EACCES
@@ -332,7 +330,7 @@
 .It Bq Er EFAULT
 .Fa sb
 or
-.Em name
+.Fa path
 points to an invalid address.
 .It Bq Er EIO
 An I/O error occurred while reading from or writing to the file system.
@@ -354,6 +352,24 @@
 does not exist.
 .El
 .Pp
+In addition,
+.Fn fstatat
+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 fstat
 will fail if:
 .Bl -tag -width Er



Home | Main Index | Thread Index | Old Index