devattr.8: Add missing .El
[dragonfly.git] / sbin / devattr / devattr.8
1 .\"
2 .\" Copyright (c) 2010 The DragonFly Project.   All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to The DragonFly Project
5 .\" by Nolan Lum <nol888@gmail.com>
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\"
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in
15 .\"    the documentation and/or other materials provided with the
16 .\"    distribution.
17 .\" 3. Neither the name of The DragonFly Project nor the names of its
18 .\"    contributors may be used to endorse or promote products derived
19 .\"    from this software without specific, prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.     IN NO EVENT SHALL THE
25 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" SUCH DAMAGE.
33 .Dd December 6, 2010
34 .Os
35 .Dt DEVATTR 8
36 .Sh NAME
37 .Nm devattr
38 .Nd tool for displaying devices and their associated properties
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl Ah
42 .Op Fl p Ar property
43 .Op Fl d Ar device
44 .Op Fl m Ar key:value
45 .Op Fl r Ar key:value
46 .Sh DESCRIPTION
47 The
48 .Nm
49 tool is for displaying a list of devices and some
50 associated properties such as their name.
51 This tool exposes the same functionality provided by the
52 .Xr devattr 3
53 library, namely the filtering capabilities offered.
54 .Pp
55 The options are as follows:
56 .Bl -tag -width indent
57 .It Fl A
58 Excludes aliases from the listing.
59 .\"
60 .It Fl h
61 Displays a help message.
62 .\"
63 .It Fl p
64 Only display the specified
65 .Ar property .
66 This can be can be specified multiple times and combined
67 with all other options.
68 .\"
69 .It Fl d
70 Only display devices with name
71 .Ar device .
72 When used with
73 .Fl p ,
74 only the specified properties of
75 .Ar device
76 are listed.
77 Can be specified multiple times.
78 Allows wildcards.
79 .\"
80 .It Fl m
81 Only display devices whose property
82 .Ar key
83 matches with wildcards value
84 .Ar value
85 unless the key\-value pair starts with ~, in which case
86 the match is inverted.
87 Stacks with
88 .Fl p ,
89 .Fl d ,
90 .Fl m .
91 Can be specified multiple times.
92 .\"
93 .It Fl r
94 Behaves similarly to
95 .Fl m ,
96 but matches with regex.
97 .El
98 .Sh EXAMPLES
99 List all devices named 'pts/0':
100 .Bd -ragged -offset indent
101 .Nm Fl d
102 pts/0
103 .Ed
104 .Pp
105 List all devices whose major number is 64:
106 .Bd -ragged -offset indent
107 .Nm Fl m
108 major:64
109 .Ed
110 .Pp
111 List all devices whose name is 'pts/0' and major number is not 64:
112 .Bd -ragged -offset indent
113 .Nm Fl d
114 pts/0
115 .Fl m
116 ~major:64
117 .Ed
118 .Sh SEE ALSO
119 .Xr devattr 3 ,
120 .Xr udevd 8
121 .Sh AUTHORS
122 .An Nolan Lum