Merge from vendor branch OPENSSH:
[dragonfly.git] / usr.sbin / dev_mkdb / dev_mkdb.8
1 .\" Copyright (c) 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)dev_mkdb.8  8.1 (Berkeley) 6/6/93
33 .\" $FreeBSD: src/usr.sbin/dev_mkdb/dev_mkdb.8,v 1.5.2.4 2003/03/11 21:13:48 trhodes Exp $
34 .\" $DragonFly: src/usr.sbin/dev_mkdb/dev_mkdb.8,v 1.2 2003/06/17 04:29:53 dillon Exp $
35 .\"
36 .Dd November 18, 2001
37 .Os
38 .Dt DEV_MKDB 8
39 .Sh NAME
40 .Nm dev_mkdb
41 .Nd create
42 .Pa /dev
43 database
44 .Sh SYNOPSIS
45 .Nm
46 .Op Fl f Ar file
47 .Op Ar directory
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility creates a
52 .Xr db 3
53 hash access method database in
54 .Ar file
55 .Pa ( /var/run/dev.db
56 by default)
57 which contains the names of all of the character and block special
58 files in
59 .Ar directory
60 .Pa ( /dev
61 by default), using the file type and the
62 .Fa st_rdev
63 field as the key.
64 .Pp
65 Keys are a structure containing a
66 .Vt mode_t
67 followed by a
68 .Vt dev_t ,
69 with any padding zero'd out.
70 The former is the type of the file
71 .Va ( st_mode Li & Dv S_IFMT ) ,
72 the latter is the
73 .Va st_rdev
74 field.
75 .Sh FILES
76 .Bl -tag -width ".Pa /var/run/dev.db" -compact
77 .It Pa /dev
78 default device directory
79 .It Pa /var/run/dev.db
80 default database file
81 .El
82 .Sh SEE ALSO
83 .Xr ps 1 ,
84 .Xr stat 2 ,
85 .Xr db 3 ,
86 .Xr devname 3 ,
87 .Xr ttyname 3
88 .Sh HISTORY
89 The
90 .Nm
91 utility appeared in
92 .Bx 4.4 .