X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..935ed37a5c468c8a1c07408573c08b8b7ef80e8b:/bsd/man/man2/mkdir.2 diff --git a/bsd/man/man2/mkdir.2 b/bsd/man/man2/mkdir.2 index dd305fb0d..4df68194d 100644 --- a/bsd/man/man2/mkdir.2 +++ b/bsd/man/man2/mkdir.2 @@ -40,10 +40,12 @@ .Nm mkdir .Nd make a directory file .Sh SYNOPSIS -.Fd #include .Fd #include .Ft int -.Fn mkdir "const char *path" "mode_t mode" +.Fo mkdir +.Fa "const char *path" +.Fa "mode_t mode" +.Fc .Sh DESCRIPTION The directory .Fa path @@ -64,49 +66,79 @@ indicates an error, and an error code is stored in .Fn Mkdir will fail and no directory will be created if: .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 -A component of the path prefix 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 EROFS -The named file resides on a read-only file system. -.It Bq Er EEXIST -The named file exists. -.It Bq Er ENOSPC -The new directory cannot be created because there is no space left -on the file system that will contain the directory. -.It Bq Er ENOSPC -There are no free inodes on the file system on which the -directory is being created. +.\" ========== +.It Bq Er EACCES +Write permission is denied for the parent directory. +.\" ========== .It Bq Er EDQUOT The new directory cannot be created because the user's quota of disk blocks on the file system that will contain the directory has been exhausted. +.\" ========== .It Bq Er EDQUOT The user's quota of inodes on the file system on which the directory is being created has been exhausted. -.It Bq Er EIO -An I/O error occurred while making the directory entry or allocating the inode. -.It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. +.\" ========== +.It Bq Er EEXIST +The named file exists. +.\" ========== .It Bq Er EFAULT .Fa Path points outside the process's allocated address space. +.\" ========== +.It Bq Er EIO +An I/O error occurred while making the directory entry +or allocating the inode. +.\" ========== +.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 EMLINK +The parent directory already has {LINK_MAX} links. +.\" ========== +.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 +A component of the path prefix does not exist +or path is an empty string. +.It Bq Er ENOSPC +The new directory cannot be created because there is no space left +on the file system that would contain it. +.\" ========== +.It Bq Er ENOSPC +There are no free inodes on the file system on which the +directory is being created. +.\" ========== +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.\" ========== +.It Bq Er EROFS +The parent directory resides on a read-only file system. .El +.Sh LEGACY SYNOPSIS +.Fd #include +.Fd #include +.Pp +The include file +.In sys/types.h +is necessary. .Sh SEE ALSO .Xr chmod 2 , .Xr stat 2 , -.Xr umask 2 +.Xr umask 2 , +.Xr compat 5 .Sh STANDARDS The .Fn mkdir