update the error return codes to reflect those in 4.3BSD
[unix-history] / usr / src / lib / libc / sys / chdir.2
index 492397a..7848409 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.
 .\"
-.\"    @(#)chdir.2     6.1 (Berkeley) %G%
+.\"    @(#)chdir.2     6.2 (Berkeley) %G%
 .\"
 .TH CHDIR 2 ""
 .UC 4
 .\"
 .TH CHDIR 2 ""
 .UC 4
@@ -35,16 +35,20 @@ will fail and the current working directory will be unchanged if
 one or more of the following are true:
 .TP 15
 [ENOTDIR]
 one or more of the following are true:
 .TP 15
 [ENOTDIR]
-A component of the pathname is not a directory.
+A component of the path prefix is not a directory.
 .TP 15
 .TP 15
-[ENOENT]
-The named directory does not exist.
+[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]
 .TP 15
 [ENOENT]
-The argument path name was too long.
+The named directory does not exist.
 .TP 15
 .TP 15
-[EPERM]
-The argument contains a byte with the high-order bit set.
+[ELOOP]
+Too many symbolic links were encountered in translating the pathname.
 .TP 15
 [EACCES]
 Search permission is denied for any component of
 .TP 15
 [EACCES]
 Search permission is denied for any component of
@@ -53,9 +57,5 @@ the path name.
 [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.
 .SH "SEE ALSO"
 chroot(2)
 .SH "SEE ALSO"
 chroot(2)