Skip to content

Commit

Permalink
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git…
Browse files Browse the repository at this point in the history
…/dragonfly
  • Loading branch information
Matthew Dillon committed Sep 13, 2009
2 parents fbbbca9 + 34590fb commit 4724c7d
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 15 deletions.
12 changes: 6 additions & 6 deletions etc/devtab
@@ -1,15 +1,15 @@
# /etc/devtab
#
# This file contains label conversions for fstab, mount, fsck, hammer,
# and other command which expect device paths. It is typically used
# to translate longer serial numbers (which devs automatically installs
# as "/dev/serno/<serialnumber>[.ext]" into short-form names to simplify
# and other commands which expect device paths. It is typically used
# to translate longer serial numbers (which devfs automatically installs
# as "/dev/serno/<serialnumber>[.suffix]" into short-form names to simplify
# fstab.
#
# For use cases a label is represented up to the last '.' (if any),
# looked up, and then any extension after and including the '.' is
# tacked onto the result. So in /etc/fstab the label "serno/fubar.s1a"
# would translate to "/dev/serno/L123456.s1a" in our example below.
# looked up, and then any suffix after and including the leading '.' is
# tacked onto the result. So in /etc/fstab the label "fubar.s1a"
# would translate to "/dev/serno/L123456.s1a" in our first example below.
#
# Currently the "serno" and "path" types are supported. Really any generic
# type is supported and will translate into a subdirectory lookup in /dev.
Expand Down
1 change: 1 addition & 0 deletions share/man/man5/Makefile
Expand Up @@ -8,6 +8,7 @@ MAN= acct.5 \
compilers.conf.5 \
core.5 \
devfs.5 \
devtab.5 \
dir.5 \
disktab.5 \
elf.5 \
Expand Down
107 changes: 107 additions & 0 deletions share/man/man5/devtab.5
@@ -0,0 +1,107 @@
.\"
.\" 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 September 13, 2009
.Dt DEVTAB 5
.Os
.Sh NAME
.Nm devtab
.Nd label conversion file for device paths
.Sh DESCRIPTION
The
.Nm
file contains label conversions for
.Xr fstab 5 ,
.Xr mount 8 ,
.Xr hammer 8 ,
and other commands which expect device paths.
It is typically used to translate longer serial numbers (which
.Xr devfs 5
automatically creates as
.Pa /dev/serno/<serial>[.suffix] )
into short form names.
.Pp
.Nm
is only read by programs, and not written;
it is the duty of the system administrator to properly create
and maintain this file.
Each conversion is described on a separate line;
fields on each line are separated by tabs or spaces.
.Pp
The first field specifies the conversion's label.
.Pp
The second field is the conversion's type.
Valid types are
.Bl -tag -width ".Sy serno" -offset indent
.It Sy serno
Translates to
.Pa /dev/serno
.It Sy path
Translates to the path as specified
.El
.Pp
The third field specifies the conversion's base path
.Sh FILES
.Bl -tag -width ".Pa /etc/devtab" -compact
.It Pa /etc/devtab
The
.Nm
file resides in
.Pa /etc .
.El
.Sh EXAMPLES
This will translate references like
.Sy fubar ,
.Sy fubar.s1a
etc.\& to their
.Pa /dev/serno/L123456
counterparts:
.Pp
.Dl "fubar serno L123456"
.Pp
This will translate references like
.Sy fubar ,
.Sy fubar.s1a
etc.\& to their
.Pa /full/path
counterparts:
.Pp
.Dl "fubar path /full/path"
.Sh SEE ALSO
.Xr getdevpath 3 ,
.Xr fstab 5 ,
.Xr hammer 8 ,
.Xr mount 8
.Sh HISTORY
The
.Nm
file format appeared in
.Dx 2.3 .
37 changes: 28 additions & 9 deletions share/man/man5/fstab.5
Expand Up @@ -33,7 +33,7 @@
.\" $FreeBSD: src/share/man/man5/fstab.5,v 1.11.2.8 2003/02/10 12:21:08 des Exp $
.\" $DragonFly: src/share/man/man5/fstab.5,v 1.5 2008/07/27 21:16:00 thomas Exp $
.\"
.Dd July 27, 2008
.Dd September 13, 2009
.Dt FSTAB 5
.Os
.Sh NAME
Expand Down Expand Up @@ -66,12 +66,29 @@ doing their thing.
The first field,
.Pq Fa fs_spec ,
describes the special file or
remote file system to be mounted. This may be a /dev/<path>, a label
from a devtab (typically /etc/devtab), or a host:path for NFS.
Note that devtab labels maybe augmented with a ".suffix" trailer. For
example "mydisk.s1a".
Also note /dev based paths can mount serial numbers similar to devtab
labels by using the path "/dev/serno/SERIALNO[.suffix]".
remote file system to be mounted.
This may be a
.Pa /dev/<path> ,
a label from a
.Xr devtab 5
(typically
.Pa /etc/devtab ) ,
or a
.Pa <host>:<path>
for NFS.
Note that
.Xr devtab 5
labels maybe augmented with a
.Pa .suffix
trailer.
For example
.Pa mydisk.s1a .
Also note
.Pa /dev
based paths can mount serial numbers similar to
.Xr devtab 5
labels by using the path
.Pa /dev/serno/SERIALNO[.suffix] .
.Pp
The second field,
.Pq Fa fs_file ,
Expand All @@ -90,7 +107,8 @@ and
file systems need be statically
compiled into the kernel;
everything else will be automatically loaded at mount
time. (Exception: the UFS family - FFS, MFS, and LFS cannot
time.
(Exception: the UFS family - FFS, MFS, and LFS cannot
currently be demand-loaded.) Some people still prefer to statically
compile other file systems as well.
.Pp
Expand Down Expand Up @@ -132,7 +150,8 @@ It is formatted as a comma separated list of options.
It contains at least the type of mount (see
.Fa fs_type
below) plus any additional options
appropriate to the file system type. See the options flag
appropriate to the file system type.
See the options flag
.Pq Fl o
in the
.Xr mount 8
Expand Down
3 changes: 3 additions & 0 deletions sys/config/GENERIC
Expand Up @@ -171,6 +171,9 @@ device psm0 at atkbdc? irq 12

device vga0 at isa?

# kbdmux is the keyboard multiplexer
device kbdmux

# splash screen/screen saver
pseudo-device splash

Expand Down
2 changes: 2 additions & 0 deletions sys/dev/misc/kbdmux/kbdmux.c
Expand Up @@ -31,6 +31,8 @@
* $FreeBSD$
*/

#include "opt_kbd.h"

#include <sys/param.h>
#include <sys/bus.h>
#include <sys/conf.h>
Expand Down

0 comments on commit 4724c7d

Please sign in to comment.