]>
Commit | Line | Data |
---|---|---|
44a7a5ab A |
1 | .\" $NetBSD: mknod.8,v 1.15 1998/09/11 07:20:48 mycroft Exp $ |
2 | .\" | |
3 | .\" Copyright (c) 1980, 1991, 1993 | |
4 | .\" The Regents of the University of California. All rights reserved. | |
5 | .\" | |
6 | .\" Redistribution and use in source and binary forms, with or without | |
7 | .\" modification, are permitted provided that the following conditions | |
8 | .\" are met: | |
9 | .\" 1. Redistributions of source code must retain the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer. | |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer in the | |
13 | .\" documentation and/or other materials provided with the distribution. | |
14 | .\" 3. All advertising materials mentioning features or use of this software | |
15 | .\" must display the following acknowledgement: | |
16 | .\" This product includes software developed by the University of | |
17 | .\" California, Berkeley and its contributors. | |
18 | .\" 4. Neither the name of the University nor the names of its contributors | |
19 | .\" may be used to endorse or promote products derived from this software | |
20 | .\" without specific prior written permission. | |
21 | .\" | |
22 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
23 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
24 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
25 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
26 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
28 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
29 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
30 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
32 | .\" SUCH DAMAGE. | |
33 | .\" | |
34 | .\" @(#)mknod.8 8.2 (Berkeley) 12/11/93 | |
35 | .\" | |
36 | .Dd September 11, 1998 | |
37 | .Dt MKNOD 8 | |
38 | .Os NetBSD 1.4 | |
39 | .Sh NAME | |
40 | .Nm mknod | |
41 | .Nd make device special file | |
42 | .Sh SYNOPSIS | |
43 | .Nm | |
44 | .Op Fl F Ar format | |
45 | .Ar name | |
46 | .Op Cm c | Cm b | |
47 | .Ar major minor | |
f383e97b | 48 | .Nm |
44a7a5ab A |
49 | .Op Fl F Ar format |
50 | .Ar name | |
51 | .Op Cm c | Cm b | |
52 | .Ar major unit subunit | |
f383e97b | 53 | .Nm |
44a7a5ab A |
54 | .Ar name |
55 | .Op Cm c | Cm b | |
56 | .Ar number | |
864a4b6e A |
57 | .Nm |
58 | .Ar name | |
59 | .Ar w | |
44a7a5ab A |
60 | .Sh DESCRIPTION |
61 | The | |
62 | .Nm | |
63 | command creates device special files. | |
44a7a5ab A |
64 | .Pp |
65 | To make nodes manually, the required arguments are: | |
66 | .Pp | |
67 | .Bl -tag -width majorx | |
68 | .It Ar name | |
69 | Device name, for example | |
70 | .Dq sd | |
71 | for a SCSI disk on an HP300 or a | |
72 | .Dq pty | |
73 | for pseudo-devices. | |
864a4b6e | 74 | .It Cm b | Cm c | Cm w |
44a7a5ab A |
75 | Type of device. If the |
76 | device is a block type device such as a tape or disk drive which needs | |
77 | both cooked and raw special files, | |
78 | the type is | |
79 | .Cm b . | |
864a4b6e A |
80 | Whiteout nodes are type |
81 | .Cm w . | |
44a7a5ab A |
82 | All other devices are character type devices, such as terminal |
83 | and pseudo devices, and are type | |
84 | .Cm c . | |
85 | .It Ar major | |
86 | The major device number is an integer number which tells the kernel | |
40bf83fe | 87 | which device driver entry point to use. |
44a7a5ab A |
88 | .It Ar minor |
89 | The minor device number tells the kernel which one of several similar | |
90 | devices the node corresponds to; for example, it may be a specific serial | |
91 | port or pty. | |
92 | .It Ar unit and subunit | |
93 | The unit and subunit numbers select a subset of a device; for example, the | |
94 | unit may specify a particular SCSI disk, and the subunit a partition on | |
95 | that disk. (Currently this form of specification is only supported by the | |
96 | .Ar bsdos | |
97 | format, for compatibility with the | |
98 | .Bsx | |
40bf83fe | 99 | .Xr mknod 8 . ) |
44a7a5ab A |
100 | .El |
101 | .Pp | |
102 | Device numbers for different operating systems may be packed in a different | |
103 | format. To create device nodes that may be used by such an operating system | |
104 | (e.g. in an exported file system used for netbooting), the | |
105 | .Fl F | |
106 | option is used. The following formats are recognized: | |
107 | native, | |
108 | 386bsd, | |
109 | 4bsd, | |
110 | bsdos, | |
111 | freebsd, | |
112 | hpux, | |
113 | isc, | |
114 | linux, | |
115 | netbsd, | |
116 | osf1, | |
117 | sco, | |
118 | solaris, | |
119 | sunos, | |
120 | svr3, | |
121 | svr4 and | |
122 | ultrix. | |
123 | .Pp | |
124 | Alternatively, a single opaque device number may be specified. | |
125 | .Sh SEE ALSO | |
126 | .Xr mkfifo 1 , | |
127 | .Xr mkfifo 2 , | |
40bf83fe | 128 | .Xr mknod 2 |
44a7a5ab A |
129 | .Sh HISTORY |
130 | A | |
131 | .Nm | |
132 | command appeared in | |
133 | .At v6 . | |
134 | The | |
135 | .Fl F | |
136 | option appeared in | |
137 | .Nx 1.4 . |