]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/devfs.5
Xr make_dev(9) from devfs(5).
[FreeBSD/FreeBSD.git] / share / man / man5 / devfs.5
1 .\" Copyright (c) 1996
2 .\"     Mike Pritchard <mpp@FreeBSD.org>.  All rights reserved.
3 .\"
4 .\" Copyright (c) 1992, 1993, 1994
5 .\"     The Regents of the University of California.  All rights reserved.
6 .\" All rights reserved.
7 .\"
8 .\" This code is derived from software donated to Berkeley by
9 .\" Jan-Simon Pendry.
10 .\"
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
13 .\" are met:
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\"    notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\"    notice, this list of conditions and the following disclaimer in the
18 .\"    documentation and/or other materials provided with the distribution.
19 .\" 3. Neither the name of the University nor the names of its contributors
20 .\"    may be used to endorse or promote products derived from this software
21 .\"    without specific prior written permission.
22 .\"
23 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\" SUCH DAMAGE.
34 .\"
35 .\" $FreeBSD$
36 .\"
37 .Dd February 9, 2012
38 .Dt DEVFS 5
39 .Os
40 .Sh NAME
41 .Nm devfs
42 .Nd device file system
43 .Sh SYNOPSIS
44 .Bd -literal
45 devfs   /dev    devfs rw 0 0
46 .Ed
47 .Sh DESCRIPTION
48 The device file system, or
49 .Nm ,
50 provides access to kernel's device
51 namespace in the global file system namespace.
52 The conventional mount point is
53 .Pa /dev .
54 .Pp
55 The file system includes several directories, links, symbolic links
56 and devices, some of which can also be written.
57 In a chroot'ed
58 environment,
59 .Nm
60 can be used to create a new
61 .Pa /dev
62 mount point.
63 .Pp
64 The
65 .Xr mknod 8
66 tool can be used to recover deleted device entries under
67 .Nm .
68 .Pp
69 The
70 .Xr fdescfs 5
71 filesystem is an alternate means for populating
72 .Pa /dev/fd .
73 The character devices that both
74 .Nm
75 and
76 .Xr fdescfs 5
77 present in
78 .Pa /dev/fd
79 correspond to the open file descriptors of the process
80 accessing the directory.
81 .Nm
82 only creates files for the standard file descriptors
83 .Pa 0 ,
84 .Pa 1
85 and
86 .Pa 2 .
87 .Xr fdescfs 5
88 creates files for all open descriptors.
89 .Pp
90 The options are as follows:
91 .Bl -tag -width indent
92 .It Fl o Ar options
93 Use the specified mount
94 .Ar options ,
95 as described in
96 .Xr mount 8 .
97 The following devfs file system-specific options are available:
98 .Bl -tag -width indent
99 .It Cm ruleset Ns No = Ns Ar ruleset
100 Set ruleset number
101 .Ar ruleset
102 as the current ruleset for the mount-point and apply all its rules.
103 If the ruleset number
104 .Ar ruleset
105 does not exist, an empty ruleset with the number
106 .Ar ruleset
107 is created.
108 See
109 .Xr devfs 8
110 for more information on working with devfs rulesets.
111 .El
112 .El
113 .Sh FILES
114 .Bl -tag -width /dev/XXXX -compact
115 .It Pa /dev
116 The normal
117 .Nm
118 mount point.
119 .El
120 .Sh EXAMPLES
121 To mount a
122 .Nm
123 volume located on
124 .Pa /mychroot/dev :
125 .Pp
126 .Dl "mount -t devfs devfs /mychroot/dev"
127 .Sh SEE ALSO
128 .Xr fdescfs 5 ,
129 .Xr devfs 8 ,
130 .Xr mount 8 ,
131 .Xr make_dev 9
132 .Sh HISTORY
133 The
134 .Nm
135 file system first appeared in
136 .Fx 2.0 .
137 It became the preferred method for accessing devices in
138 .Fx 5.0
139 and the only method in
140 .Fx 6.0 .
141 The
142 .Nm
143 manual page first appeared in
144 .Fx 2.2 .
145 .Sh AUTHORS
146 The
147 .Nm
148 manual page was written by
149 .An Mike Pritchard Aq Mt mpp@FreeBSD.org .