Module Name:    src
Committed By:   wiz
Date:           Sun Mar  4 11:58:31 UTC 2012

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

Log Message:
Sort error descriptions.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libc/sys/chmod.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/chmod.2
diff -u src/lib/libc/sys/chmod.2:1.39 src/lib/libc/sys/chmod.2:1.40
--- src/lib/libc/sys/chmod.2:1.39	Sun Mar  4 00:07:44 2012
+++ src/lib/libc/sys/chmod.2	Sun Mar  4 11:58:31 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chmod.2,v 1.39 2012/03/04 00:07:44 dholland Exp $
+.\"	$NetBSD: chmod.2,v 1.40 2012/03/04 11:58:31 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -144,8 +144,23 @@ and
 .Fn lchmod
 will fail and the file mode will be unchanged if:
 .Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
+.It Bq Er EACCES
+Search permission is denied for a component of the path prefix.
+.It Bq Er EFAULT
+.Fa path
+points outside the process's allocated address space.
+.It Bq Er EFTYPE
+The effective user ID is not the super-user, the
+.Fa mode
+includes the sticky bit
+.Pq Dv S_ISVTX ,
+and
+.Fa path
+does not refer to a directory.
+.It Bq Er EIO
+An I/O error occurred while reading from or writing to the file system.
+.It Bq Er ELOOP
+Too many symbolic links were encountered in translating the pathname.
 .It Bq Er ENAMETOOLONG
 A component of a pathname exceeded
 .Brq Dv NAME_MAX
@@ -154,33 +169,17 @@ characters, or an entire path name excee
 characters.
 .It Bq Er ENOENT
 The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
+.It Bq Er ENOTDIR
+A component of the path prefix is not a directory.
 .It Bq Er EPERM
 The effective user ID does not match the owner of the file and
-the effective user ID is not the super-user.
-.It Bq Er EPERM
-The mode includes the setgid bit
+the effective user ID is not the super-user; or
+the mode includes the setgid bit
 .Pq Dv S_ISGID
 but the file's group is neither the effective group ID nor is it in the
 group access list.
 .It Bq Er EROFS
 The named file resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.It Bq Er EFTYPE
-The effective user ID is not the super-user, the
-.Fa mode
-includes the sticky bit
-.Pq Dv S_ISVTX ,
-and
-.Fa path
-does not refer to a directory.
 .El
 .Pp
 .Fn fchmod
@@ -188,29 +187,28 @@ will fail if:
 .Bl -tag -width Er
 .It Bq Er EBADF
 The descriptor is not valid.
+.It Bq Er EFTYPE
+The effective user ID is not the super-user, the
+.Fa mode
+includes the sticky bit
+.Pq Dv S_ISVTX ,
+and
+.Fa fd
+does not refer to a directory.
 .It Bq Er EINVAL
 .Fa fd
 refers to a socket, not to a file.
+.It Bq Er EIO
+An I/O error occurred while reading from or writing to the file system.
 .It Bq Er EPERM
 The effective user ID does not match the owner of the file and
-the effective user ID is not the super-user.
-.It Bq Er EPERM
-The mode includes the setgid bit
+the effective user ID is not the super-user; or
+the mode includes the setgid bit
 .Pq Dv S_ISGID
 but the file's group is neither the effective group ID nor is it in the
 group access list.
 .It Bq Er EROFS
 The file resides on a read-only file system.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.It Bq Er EFTYPE
-The effective user ID is not the super-user, the
-.Fa mode
-includes the sticky bit
-.Pq Dv S_ISVTX ,
-and
-.Fa fd
-does not refer to a directory.
 .El
 .Sh SEE ALSO
 .Xr chmod 1 ,

Reply via email to