update the error return codes to reflect those in 4.3BSD
[unix-history] / usr / src / lib / libc / sys / chmod.2
index 14175e8..5f4a5a8 100644 (file)
@@ -2,7 +2,7 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)chmod.2     6.1 (Berkeley) %G%
+.\"    @(#)chmod.2     6.2 (Berkeley) %G%
 .\"
 .TH CHMOD 2 ""
 .UC 4
 .\"
 .TH CHMOD 2 ""
 .UC 4
@@ -66,20 +66,24 @@ is set to indicate the error.
 .I Chmod
 will fail and the file mode will be unchanged if:
 .TP 15
 .I Chmod
 will fail and the file mode will be unchanged if:
 .TP 15
-[EPERM]
-The argument contains a byte with the high-order bit set.
-.TP 15
 [ENOTDIR]
 A component of the path prefix is not a directory.
 .TP 15
 [ENOTDIR]
 A component of the path prefix is not a directory.
 .TP 15
-[ENOENT]
-The pathname was too long.
+[EINVAL]
+The pathname contains a character with the high-order bit set.
+.TP 15
+[ENAMETOOLONG]
+A component of a pathname exceeded 255 characters,
+or an entire path name exceeded 1023 characters.
 .TP 15
 [ENOENT]
 The named file does not exist.
 .TP 15
 [EACCES]
 .TP 15
 [ENOENT]
 The named file does not exist.
 .TP 15
 [EACCES]
-Search permission is denied on a component of the path prefix.
+Search permission is denied for a component of the path prefix.
+.TP 15
+[ELOOP]
+Too many symbolic links were encountered in translating the pathname.
 .TP 15
 [EPERM]
 The effective user ID does not match the owner of the file and
 .TP 15
 [EPERM]
 The effective user ID does not match the owner of the file and
@@ -91,9 +95,6 @@ The named file resides on a read-only file system.
 [EFAULT]
 .I Path
 points outside the process's allocated address space.
 [EFAULT]
 .I Path
 points outside the process's allocated address space.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
 .PP
 .I Fchmod
 will fail if:
 .PP
 .I Fchmod
 will fail if: