|
|
1.1 root 1: .TH MKNOD 2 "2 July 1983"
2: .UC 4
3: .SH NAME
4: mknod \- make a special file
5: .SH SYNOPSIS
6: .nf
7: .ft B
8: mknod(path, mode, dev)
9: char *path;
10: int mode, dev;
11: .fi
12: .ft R
13: .SH DESCRIPTION
14: .I Mknod
15: creates a new file
16: whose name is
17: .I path.
18: The mode of the new file
19: (including special file bits)
20: is initialized from
21: .IR mode .
22: (The protection part of the mode
23: is modified by the process's mode mask; see
24: .IR umask (2)).
25: The first block pointer of the i-node
26: is initialized from
27: .I dev
28: and is used to specify which device the special file
29: refers to.
30: .PP
31: If mode indicates a block or character special file,
32: .I dev
33: is a configuration dependent specification of a character or block
34: I/O device. If
35: .I mode
36: does not indicate a block special or character special device,
37: .I dev
38: is ignored.
39: .PP
40: .I Mknod
41: may be invoked only by the super-user.
42: .SH "RETURN VALUE
43: Upon successful completion a value of 0 is returned.
44: Otherwise, a value of \-1 is returned and \fIerrno\fP
45: is set to indicate the error.
46: .SH ERRORS
47: .I Mknod
48: will fail and the file mode will be unchanged if:
49: .TP 15
50: [EPERM]
51: The process's effective user ID is not super-user.
52: .TP 15
53: [EPERM]
54: The pathname contains a character with the high-order bit set.
55: .TP 15
56: [ENOTDIR]
57: A component of the path prefix is not a directory.
58: .TP 15
59: [ENOENT]
60: A component of the path prefix does not exist.
61: .TP 15
62: [EROFS]
63: The named file resides on a read-only file system.
64: .TP 15
65: [EEXIST]
66: The named file exists.
67: .TP 15
68: [EFAULT]
69: .I Path
70: points outside the process's allocated address space.
71: .TP 15
72: [ELOOP]
73: Too many symbolic links were encountered in translating the pathname.
74: .SH "SEE ALSO"
75: chmod(2), stat(2), umask(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.