X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..935ed37a5c468c8a1c07408573c08b8b7ef80e8b:/bsd/man/man2/chdir.2 diff --git a/bsd/man/man2/chdir.2 b/bsd/man/man2/chdir.2 index 407f709e2..d8476b8e6 100644 --- a/bsd/man/man2/chdir.2 +++ b/bsd/man/man2/chdir.2 @@ -43,9 +43,13 @@ .Sh SYNOPSIS .Fd #include .Ft int -.Fn chdir "const char *path" +.Fo chdir +.Fa "const char *path" +.Fc .Ft int -.Fn fchdir "int fd" +.Fo fchdir +.Fa "int fildes" +.Fc .Sh DESCRIPTION The .Fa path @@ -63,7 +67,7 @@ The .Fn fchdir function causes the directory referenced by -.Fa fd +.Fa fildes to become the current working directory, the starting point for path searches of pathnames not beginning with a slash, @@ -78,45 +82,64 @@ Otherwise, a value of -1 is returned and is set to indicate the error. .Sh ERRORS +The .Fn Chdir -will fail and the current working directory will be unchanged if -one or more of the following are true: +system call will fail +and the current working directory will be unchanged +if one or more of the following are true: .Bl -tag -width Er -.It Bq Er ENOTDIR -A component of the path prefix is not a directory. -.It Bq Er ENAMETOOLONG -A component of a pathname exceeded -.Dv {NAME_MAX} -characters, or an entire path name exceeded -.Dv {PATH_MAX} -characters. -.It Bq Er ENOENT -The named directory does not exist. -.It Bq Er ELOOP -Too many symbolic links were encountered in translating the pathname. +.\" ========== .It Bq Er EACCES Search permission is denied for any component of the path name. +.\" ========== .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 ELOOP +Too many symbolic links were encountered in translating the pathname. +This is taken to be indicative of a looping symbolic link. +.\" ========== +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded +.Dv {NAME_MAX} +characters, or an entire path name exceeded +.Dv {PATH_MAX} +characters. +.\" ========== +.It Bq Er ENOENT +The named directory does not exist. +.\" ========== +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. .El .Pp .Fn Fchdir will fail and the current working directory will be unchanged if one or more of the following are true: .Bl -tag -width Er +.\" ========== .It Bq Er EACCES Search permission is denied for the directory referenced by the file descriptor. -.It Bq Er ENOTDIR -The file descriptor does not reference a directory. +.\" ========== .It Bq Er EBADF The argument -.Fa fd +.Fa fildes is not a valid file descriptor. +.\" ========== +.It Bq Er EINTR +.Fn Fchdir was interrupted by a signal. +.\" ========== +.It Bq Er EIO +An I/O error occurred while reading from or writing to the file system. +.\" ========== +.It Bq Er ENOTDIR +The file descriptor does not reference a directory. .El .Sh SEE ALSO .Xr chroot 2