From e30ec7318b23b01eebfeb408e0cd794efed2f7f8 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 14 Aug 2009 21:07:21 +0200 Subject: [PATCH] mount_devfs(8): Add a manual page. --- sbin/mount_devfs/Makefile | 3 +- sbin/mount_devfs/mount_devfs.8 | 224 +++++++++++++---------------------------- 2 files changed, 72 insertions(+), 155 deletions(-) rewrite sbin/mount_devfs/mount_devfs.8 (82%) diff --git a/sbin/mount_devfs/Makefile b/sbin/mount_devfs/Makefile index de325f7953..c69db1a3b5 100644 --- a/sbin/mount_devfs/Makefile +++ b/sbin/mount_devfs/Makefile @@ -1,7 +1,6 @@ PROG= mount_devfs SRCS= mount_devfs.c getmntopts.c -#MAN= mount_devfs.8 -NOMAN= +MAN= mount_devfs.8 MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} diff --git a/sbin/mount_devfs/mount_devfs.8 b/sbin/mount_devfs/mount_devfs.8 dissimilarity index 82% index cf462a463a..b58adf6f8d 100644 --- a/sbin/mount_devfs/mount_devfs.8 +++ b/sbin/mount_devfs/mount_devfs.8 @@ -1,153 +1,71 @@ -.\" -.\" Copyright (c) 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. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" 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. -.\" -.\" @(#)mount_portal.8 8.3 (Berkeley) 3/27/94 -.\" $FreeBSD: src/sbin/mount_portal/mount_portal.8,v 1.8.2.2 2001/12/20 16:41:47 ru Exp $ -.\" $DragonFly: src/sbin/mount_portal/mount_portal.8,v 1.2 2003/06/17 04:27:33 dillon Exp $ -.\" -.Dd March 27, 1994 -.Dt MOUNT_PORTAL 8 -.Os -.Sh NAME -.Nm mount_portal -.Nd mount the portal daemon -.Sh SYNOPSIS -.Nm -.Op Fl o Ar options -.Ar /etc/portal.conf -.Ar mount_point -.Sh DESCRIPTION -The -.Nm -command attaches an instance of the portal daemon -to the global filesystem namespace. -The conventional mount point is -.Pa /p . -.\" .PA /dev . -This command is normally executed by -.Xr mount 8 -at boot time. -.Pp -The options are as follows: -.Bl -tag -width indent -.It Fl o -Options are specified with a -.Fl o -flag followed by a comma separated string of options. -See the -.Xr mount 8 -man page for possible options and their meanings. -.El -.Pp -The portal daemon provides an -.Em open -service. -Objects opened under the portal mount point are -dynamically created by the portal daemon according -to rules specified in the named configuration file. -Using this mechanism allows descriptors such as sockets -to be made available in the filesystem namespace. -.Pp -The portal daemon works by being passed the full pathname -of the object being opened. -The daemon creates an appropriate descriptor according -to the rules in the configuration file, and then passes the descriptor back -to the calling process as the result of the open system call. -.Sh NAMESPACE -By convention, the portal daemon divides the namespace into sub-namespaces, -each of which handles objects of a particular type. -.Pp -The following sub-namespaces are currently implemented: -.Pa tcplisten , -.Pa tcp -and -.Pa fs . -The -.Pa tcplisten -namespace takes a slash separated hostname and port and creates a TCP/IP -socket bound to the given hostname-port pair. -The hostname may be -specified as "ANY" to allow any other host to connect to the socket. -A -port number of 0 will dynamically allocate a port, this can be -discovered by calling -.Xr getsockname 2 -with the returned file descriptor. -Privileged ports can only be bound to -by the super-user. -The -.Pa tcp -namespace takes a hostname and a port (slash separated) and -creates an open TCP/IP connection. -The -.Pa fs -namespace opens the named file, starting back at the root directory. -This can be used to provide a controlled escape path from -a chrooted environment. -.Sh "CONFIGURATION FILE" -The configuration file contains a list of rules. -Each rule takes one line and consists of two or more -whitespace separated fields. -A hash (``#'') character causes the remainder of a line to -be ignored. Blank lines are ignored. -.Pp -The first field is a pathname prefix to match -against the requested pathname. -If a match is found, the second field -tells the daemon what type of object to create. -Subsequent fields are passed to the creation function. -.Bd -literal -# @(#)portal.conf 5.1 (Berkeley) 7/13/92 -tcplisten/ tcplisten tcplisten/ -tcp/ tcp tcp/ -fs/ file fs/ -.Ed -.Sh FILES -.Bl -tag -width /p/* -compact -.It Pa /p/* -.El -.Sh SEE ALSO -.Xr mount 2 , -.Xr unmount 2 , -.Xr fstab 5 , -.Xr mount 8 -.Sh CAVEATS -This filesystem may not be NFS-exported. -.Sh HISTORY -The -.Nm -utility first appeared in -.Bx 4.4 . +.\" +.\" Copyright (c) 2009 +.\" The DragonFly Project. All rights reserved. +.\" +.\" 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 DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.Dd August 14, 2009 +.Dt MOUNT_DEVFS 8 +.Os +.Sh NAME +.Nm mount_devfs +.Nd mount device file system +.Sh SYNOPSIS +.Nm +.Op Fl o Ar options +.Ar mount_point +.Sh DESCRIPTION +The +.Nm +command attaches an instance of the device file system (or +.Xr devfs 5 ) +to the global file system namespace. +This command is automatically executed for +.Pa /dev +at boot time. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl o +Options are specified with a +.Fl o +flag followed by a comma separated string of options. +See the +.Xr mount 8 +man page for possible options and their meanings. +.El +.Sh SEE ALSO +.Xr mount 2 , +.Xr unmount 2 , +.Xr devfs 5 , +.Xr mount 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Dx 2.3 . -- 2.11.4.GIT