Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH MKNOD 2 |
2 | .SH NAME | |
3 | mknod \- make a directory or a special file | |
4 | .SH SYNOPSIS | |
5 | .B mknod(name, mode, addr) | |
6 | .br | |
7 | .B char *name; | |
8 | .SH DESCRIPTION | |
9 | .I Mknod | |
10 | creates a new file | |
11 | whose name is the null-terminated string pointed | |
12 | to by | |
13 | .IR name . | |
14 | The mode of the new file | |
15 | (including directory and special file bits) | |
16 | is initialized from | |
17 | .IR mode . | |
18 | (The protection part of the mode | |
19 | is modified by the process's mode mask; see | |
20 | .IR umask (2)). | |
21 | The first block pointer of the i-node | |
22 | is initialized from | |
23 | .IR addr . | |
24 | For ordinary files and directories | |
25 | .I addr | |
26 | is normally zero. | |
27 | In the case of a special file, | |
28 | .I addr | |
29 | specifies which special file. | |
30 | .PP | |
31 | .I Mknod | |
32 | may be invoked only by the super-user. | |
33 | .SH "SEE ALSO" | |
34 | mkdir(1), mknod(1), filsys(5) | |
35 | .SH DIAGNOSTICS | |
36 | Zero is returned if the file has been made; \-1 | |
37 | if the file already exists | |
38 | or if the user is not the super-user. | |
39 | .SH "ASSEMBLER (PDP-11)" | |
40 | (mknod = 14.) | |
41 | .br | |
42 | .B sys mknod; name; mode; addr |