source: trunk/minix/man/man2/mkdir.2@ 22

Last change on this file since 22 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.9 KB
Line 
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)mkdir.2 6.4 (Berkeley) 8/26/85
6.\"
7.TH MKDIR 2 "August 26, 1985"
8.UC 5
9.SH NAME
10mkdir \- make a directory file
11.SH SYNOPSIS
12.nf
13.ft B
14#include <sys/types.h>
15#include <sys/stat.h>
16
17int mkdir(const char *\fIpath\fP, mode_t \fImode\fP)
18.fi
19.ft R
20.SH DESCRIPTION
21.B Mkdir
22creates a new directory file with name
23.IR path .
24The mode of the new file
25is initialized from
26.IR mode .
27(The protection part of the mode
28is modified by the process's mode mask; see
29.BR umask (2)).
30.PP
31The directory's owner ID is set to the process's effective user ID.
32The directory's group ID is set to that of the parent directory in
33which it is created.
34.PP
35The low-order 9 bits of mode are modified by the process's
36file mode creation mask: all bits set in the process's file mode
37creation mask are cleared. See
38.BR umask (2).
39.SH "RETURN VALUE
40A 0 return value indicates success. A \-1 return value
41indicates an error, and an error code is stored in
42.B errno.
43.SH "ERRORS
44.B Mkdir
45will fail and no directory will be created if:
46.TP 15
47[ENOTDIR]
48A component of the path prefix is not a directory.
49.TP 15
50[ENAMETOOLONG]
51The path name exceeds PATH_MAX characters.
52.TP 15
53[ENOENT]
54A component of the path prefix does not exist.
55.TP 15
56[EACCES]
57Search permission is denied for a component of the path prefix.
58.TP 15
59[ELOOP]
60Too many symbolic links were encountered in translating the pathname.
61(Minix-vmd)
62.TP 15
63[EROFS]
64The named file resides on a read-only file system.
65.TP 15
66[EEXIST]
67The named file exists.
68.TP 15
69[ENOSPC]
70The directory in which the entry for the new directory is being placed
71cannot be extended because there is no space left on the file
72system containing the directory.
73.TP 15
74[ENOSPC]
75The new directory cannot be created because there
76there is no space left on the file
77system that will contain the directory.
78.TP 15
79[ENOSPC]
80There are no free inodes on the file system on which the
81directory is being created.
82.ig
83.TP 15
84[EDQUOT]
85The directory in which the entry for the new directory
86is being placed cannot be extended because the
87user's quota of disk blocks on the file system
88containing the directory has been exhausted.
89.TP 15
90[EDQUOT]
91The new directory cannot be created because the user's
92quota of disk blocks on the file system that will
93contain the directory has been exhausted.
94.TP 15
95[EDQUOT]
96The user's quota of inodes on the file system on
97which the directory is being created has been exhausted.
98..
99.TP 15
100[EIO]
101An I/O error occurred while making the directory entry or allocating the inode.
102.TP 15
103[EIO]
104An I/O error occurred while reading from or writing to the file system.
105.TP 15
106[EFAULT]
107.I Path
108points outside the process's allocated address space.
109.SH "SEE ALSO"
110.BR chmod (2),
111.BR stat (2),
112.BR umask (2).
Note: See TracBrowser for help on using the repository browser.