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