xref: /dflybsd-src/sbin/devattr/devattr.8 (revision 0b674f7495e4f156f5047bf3c1e8130298011973)
132fe4284SNolan Lum.\"
232fe4284SNolan Lum.\" Copyright (c) 2010 The DragonFly Project.	All rights reserved.
332fe4284SNolan Lum.\"
432fe4284SNolan Lum.\" This code is derived from software contributed to The DragonFly Project
532fe4284SNolan Lum.\" by Nolan Lum <nol888@gmail.com>
632fe4284SNolan Lum.\"
732fe4284SNolan Lum.\" Redistribution and use in source and binary forms, with or without
832fe4284SNolan Lum.\" modification, are permitted provided that the following conditions
932fe4284SNolan Lum.\" are met:
1032fe4284SNolan Lum.\"
1132fe4284SNolan Lum.\" 1. Redistributions of source code must retain the above copyright
1232fe4284SNolan Lum.\"    notice, this list of conditions and the following disclaimer.
1332fe4284SNolan Lum.\" 2. Redistributions in binary form must reproduce the above copyright
1432fe4284SNolan Lum.\"    notice, this list of conditions and the following disclaimer in
1532fe4284SNolan Lum.\"    the documentation and/or other materials provided with the
1632fe4284SNolan Lum.\"    distribution.
1732fe4284SNolan Lum.\" 3. Neither the name of The DragonFly Project nor the names of its
1832fe4284SNolan Lum.\"    contributors may be used to endorse or promote products derived
1932fe4284SNolan Lum.\"    from this software without specific, prior written permission.
2032fe4284SNolan Lum.\"
2132fe4284SNolan Lum.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2232fe4284SNolan Lum.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2332fe4284SNolan Lum.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2432fe4284SNolan Lum.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.	 IN NO EVENT SHALL THE
2532fe4284SNolan Lum.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2632fe4284SNolan Lum.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
2732fe4284SNolan Lum.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2832fe4284SNolan Lum.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
2932fe4284SNolan Lum.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3032fe4284SNolan Lum.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
3132fe4284SNolan Lum.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3232fe4284SNolan Lum.\" SUCH DAMAGE.
33fb5b3747SSascha Wildner.\"
34*0b674f74SSascha Wildner.Dd September 29, 2016
3532fe4284SNolan Lum.Dt DEVATTR 8
36fb5b3747SSascha Wildner.Os
3732fe4284SNolan Lum.Sh NAME
3832fe4284SNolan Lum.Nm devattr
3932fe4284SNolan Lum.Nd tool for displaying devices and their associated properties
4032fe4284SNolan Lum.Sh SYNOPSIS
4132fe4284SNolan Lum.Nm
421de39603SMatthew Dillon.Op Fl AhM
4332fe4284SNolan Lum.Op Fl p Ar property
4432fe4284SNolan Lum.Op Fl d Ar device
4532fe4284SNolan Lum.Op Fl m Ar key:value
4632fe4284SNolan Lum.Op Fl r Ar key:value
4732fe4284SNolan Lum.Sh DESCRIPTION
4832fe4284SNolan LumThe
4932fe4284SNolan Lum.Nm
5032fe4284SNolan Lumtool is for displaying a list of devices and some
5114861de4SSascha Wildnerassociated properties such as their name.
5214861de4SSascha WildnerThis tool exposes the same functionality provided by the
5332fe4284SNolan Lum.Xr devattr 3
5414861de4SSascha Wildnerlibrary, namely the filtering capabilities offered.
5532fe4284SNolan Lum.Pp
5632fe4284SNolan LumThe options are as follows:
5732fe4284SNolan Lum.Bl -tag -width indent
5832fe4284SNolan Lum.It Fl A
5932fe4284SNolan LumExcludes aliases from the listing.
6032fe4284SNolan Lum.\"
6132fe4284SNolan Lum.It Fl h
6232fe4284SNolan LumDisplays a help message.
6332fe4284SNolan Lum.\"
641de39603SMatthew Dillon.It Fl M
651de39603SMatthew DillonContinue monitoring after initial scan.
661de39603SMatthew DillonProgram continues monitoring for changes and
671de39603SMatthew Dillondoes not exit until killed.
6832fe4284SNolan Lum.It Fl p
6914861de4SSascha WildnerOnly display the specified
7014861de4SSascha Wildner.Ar property .
7132fe4284SNolan LumThis can be can be specified multiple times and combined
7232fe4284SNolan Lumwith all other options.
7332fe4284SNolan Lum.\"
7432fe4284SNolan Lum.It Fl d
7532fe4284SNolan LumOnly display devices with name
7614861de4SSascha Wildner.Ar device .
7732fe4284SNolan LumWhen used with
7832fe4284SNolan Lum.Fl p ,
7914861de4SSascha Wildneronly the specified properties of
8014861de4SSascha Wildner.Ar device
8114861de4SSascha Wildnerare listed.
8214861de4SSascha WildnerCan be specified multiple times.
8314861de4SSascha WildnerAllows wildcards.
8432fe4284SNolan Lum.\"
8532fe4284SNolan Lum.It Fl m
8632fe4284SNolan LumOnly display devices whose property
8714861de4SSascha Wildner.Ar key
8832fe4284SNolan Lummatches with wildcards value
8914861de4SSascha Wildner.Ar value
9032fe4284SNolan Lumunless the key\-value pair starts with ~, in which case
9114861de4SSascha Wildnerthe match is inverted.
9214861de4SSascha WildnerStacks with
9332fe4284SNolan Lum.Fl p ,
9432fe4284SNolan Lum.Fl d ,
9532fe4284SNolan Lum.Fl m .
9632fe4284SNolan LumCan be specified multiple times.
9732fe4284SNolan Lum.\"
9832fe4284SNolan Lum.It Fl r
9932fe4284SNolan LumBehaves similarly to
10032fe4284SNolan Lum.Fl m ,
10132fe4284SNolan Lumbut matches with regex.
1027b11c81eSSascha Wildner.El
10332fe4284SNolan Lum.Sh EXAMPLES
10414861de4SSascha WildnerList all devices named 'pts/0':
10532fe4284SNolan Lum.Bd -ragged -offset indent
10632fe4284SNolan Lum.Nm Fl d
10732fe4284SNolan Lumpts/0
10832fe4284SNolan Lum.Ed
10932fe4284SNolan Lum.Pp
11014861de4SSascha WildnerList all devices whose major number is 64:
11132fe4284SNolan Lum.Bd -ragged -offset indent
11232fe4284SNolan Lum.Nm Fl m
11332fe4284SNolan Lummajor:64
11432fe4284SNolan Lum.Ed
11532fe4284SNolan Lum.Pp
11614861de4SSascha WildnerList all devices whose name is 'pts/0' and major number is not 64:
11732fe4284SNolan Lum.Bd -ragged -offset indent
11832fe4284SNolan Lum.Nm Fl d
11932fe4284SNolan Lumpts/0
12032fe4284SNolan Lum.Fl m
12132fe4284SNolan Lum~major:64
12232fe4284SNolan Lum.Ed
12332fe4284SNolan Lum.Sh SEE ALSO
12432fe4284SNolan Lum.Xr devattr 3 ,
12532fe4284SNolan Lum.Xr udevd 8
126*0b674f74SSascha Wildner.Sh HISTORY
127*0b674f74SSascha WildnerThe
128*0b674f74SSascha Wildner.Nm
129*0b674f74SSascha Wildnercommand appeared in
130*0b674f74SSascha Wildner.Dx 2.9 .
13132fe4284SNolan Lum.Sh AUTHORS
13232fe4284SNolan Lum.An Nolan Lum
133