Module Name:    src
Committed By:   njoly
Date:           Sun Jul 28 15:46:34 UTC 2013

Modified Files:
        src/lib/libc/sys: stat.2

Log Message:
Add fstatat(2) specific errors.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libc/sys/stat.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/stat.2
diff -u src/lib/libc/sys/stat.2:1.54 src/lib/libc/sys/stat.2:1.55
--- src/lib/libc/sys/stat.2:1.54	Sun Jan 13 08:15:02 2013
+++ src/lib/libc/sys/stat.2	Sun Jul 28 15:46:34 2013
@@ -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 @@ has the following bits:
 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 @@ and
 .Li st_blocks
 fields.
 .Sh ERRORS
-.Fn stat
-and
+.Fn stat ,
 .Fn lstat
+and
+.Fn fstatat
 will fail if:
 .Bl -tag -width Er
 .It Bq Er EACCES
@@ -332,7 +330,7 @@ This can happen if a file system informa
 .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 @@ special file, and the device associated 
 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

Reply via email to