Module Name: src Committed By: wiz Date: Sat Dec 1 20:55:13 UTC 2012
Modified Files: src/lib/libc/sys: mkdir.2 Log Message: Bump date. New sentence, new line. Wording/articles. Sort errors while here. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/mkdir.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/mkdir.2 diff -u src/lib/libc/sys/mkdir.2:1.25 src/lib/libc/sys/mkdir.2:1.26 --- src/lib/libc/sys/mkdir.2:1.25 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/mkdir.2 Sat Dec 1 20:55:13 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkdir.2,v 1.25 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: mkdir.2,v 1.26 2012/12/01 20:55:13 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)mkdir.2 8.2 (Berkeley) 12/11/93 .\" -.Dd December 27, 2005 +.Dd November 18, 2012 .Dt MKDIR 2 .Os .Sh NAME @@ -58,18 +58,19 @@ works the same way as .Fn mkdir except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp The directory's owner ID is set to the process's effective user ID. The directory's group ID is set to that of the parent directory in @@ -82,8 +83,24 @@ A \-1 return value indicates an error, a .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 EACCES +Search permission is denied for a component of the path prefix. +.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. +Or, the user's quota of inodes on the file system on +which the directory is being created has been exhausted. +.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; +or 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 @@ -92,34 +109,15 @@ characters, or an entire path name excee 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 +Or, there are no free inodes on the file system on which the directory is being created. -.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 EFAULT -.Fa path -points outside the process's allocated address space. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er EROFS +The named file resides on a read-only file system. .El .Sh SEE ALSO .Xr chmod 2 , @@ -133,4 +131,3 @@ function conforms to .Fn mkdirat conforms to .St -p1003.1-2008 . -