freebsd-nq/share/man/man5/devfs.5

150 lines
3.8 KiB
Groff
Raw Normal View History

1996-12-14 22:34:11 +00:00
.\" Copyright (c) 1996
.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved.
.\"
.\" Copyright (c) 1992, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\" All rights reserved.
.\"
.\" This code is derived from software donated to Berkeley by
.\" Jan-Simon Pendry.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the University nor the names of its contributors
1996-12-14 22:34:11 +00:00
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
1997-03-07 03:28:23 +00:00
.\"
1999-08-28 00:22:10 +00:00
.\" $FreeBSD$
1997-03-07 03:28:23 +00:00
.\"
.Dd February 9, 2012
.Dt DEVFS 5
.Os
1996-12-14 22:34:11 +00:00
.Sh NAME
.Nm devfs
.Nd device file system
1996-12-14 22:34:11 +00:00
.Sh SYNOPSIS
2004-07-02 19:55:26 +00:00
.Bd -literal
devfs /dev devfs rw 0 0
2004-07-02 19:55:26 +00:00
.Ed
1996-12-14 22:34:11 +00:00
.Sh DESCRIPTION
The device file system, or
.Nm ,
provides access to kernel's device
namespace in the global file system namespace.
1996-12-14 22:34:11 +00:00
The conventional mount point is
.Pa /dev .
1996-12-14 22:34:11 +00:00
.Pp
The file system includes several directories, links, symbolic links
and devices, some of which can also be written.
In a chroot'ed
1996-12-14 22:34:11 +00:00
environment,
.Nm
can be used to create a new
.Pa /dev
1996-12-14 22:34:11 +00:00
mount point.
.Pp
The
.Xr mknod 8
tool can be used to recover deleted device entries under
.Nm .
.Pp
The
.Xr fdescfs 5
filesystem is an alternate means for populating
.Pa /dev/fd .
The character devices that both
.Nm
and
.Xr fdescfs 5
present in
.Pa /dev/fd
correspond to the open file descriptors of the process
accessing the directory.
.Nm
only creates files for the standard file descriptors
.Pa 0 ,
.Pa 1
and
.Pa 2 .
.Xr fdescfs 5
creates files for all open descriptors.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl o Ar options
Use the specified mount
.Ar options ,
as described in
.Xr mount 8 .
The following devfs file system-specific options are available:
.Bl -tag -width indent
.It Cm ruleset Ns No = Ns Ar ruleset
Set ruleset number
.Ar ruleset
as the current ruleset for the mount-point and apply all its rules.
If the ruleset number
.Ar ruleset
does not exist, an empty ruleset with the number
.Ar ruleset
is created.
See
.Xr devfs 8
for more information on working with devfs rulesets.
.El
.El
1996-12-14 22:34:11 +00:00
.Sh FILES
.Bl -tag -width /dev/XXXX -compact
.It Pa /dev
1996-12-14 22:34:11 +00:00
The normal
.Nm
1996-12-14 22:34:11 +00:00
mount point.
.El
2006-09-18 15:24:20 +00:00
.Sh EXAMPLES
To mount a
.Nm
volume located on
.Pa /mychroot/dev :
2006-09-18 15:24:20 +00:00
.Pp
.Dl "mount -t devfs devfs /mychroot/dev"
1996-12-14 22:34:11 +00:00
.Sh SEE ALSO
.Xr fdescfs 5 ,
.Xr devfs 8 ,
.Xr mount 8 ,
.Xr make_dev 9
1996-12-14 22:34:11 +00:00
.Sh HISTORY
The
.Nm
file system first appeared in
.Fx 2.0 .
It became the preferred method for accessing devices in
.Fx 5.0
and the only method in
.Fx 6.0 .
1996-12-14 22:38:09 +00:00
The
1996-12-14 22:34:11 +00:00
.Nm
manual page first appeared in
1996-12-14 22:34:11 +00:00
.Fx 2.2 .
.Sh AUTHORS
The
1996-12-14 22:34:11 +00:00
.Nm
manual page was written by
.An Mike Pritchard Aq Mt mpp@FreeBSD.org .