Merge commit '008b34be09d7b9c3e7a18d3ce9ef8b5c4f4ff8b8'
[unleashed.git] / share / man / man1 / list_devices.1
blobc51022092e00e3be200db98b88ee628755d9a26a
1 '\" te
2 .\" Copyright 2007 Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LIST_DEVICES 1 "Mar 6, 2017"
7 .SH NAME
8 list_devices \- list allocatable devices
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBlist_devices\fR [\fB-s\fR] [\fB-U\fR \fIuid\fR] [\fB-z\fR \fIzonename\fR] [\fB-a\fR [\fB-w\fR]]
13      \fB-l\fR | \fB-n\fR | \fB-u\fR [\fIdevice\fR] | [\fB-l\fR | \fB-n\fR | \fB-u\fR] \fB-c\fR \fIdev-class\fR
14 .fi
16 .LP
17 .nf
18 \fBlist_devices\fR [\fB-s\fR] \fB-d\fR \fIdev-type\fR
19 .fi
21 .SH DESCRIPTION
22 .LP
23 The \fBlist_devices\fR utility lists the allocatable devices in the system
24 according to specified qualifications.
25 .sp
26 .LP
27 The \fIdevice\fR and all device special files associated with the device are
28 listed. The device argument is optional and, if it is not present, all relevant
29 devices are listed. If \fIdev-class\fR is present, devices belonging to the
30 specified \fIdev-class\fR are listed. There is no default \fIdev-class\fR.
31 .SH OPTIONS
32 .LP
33 The following options are supported:
34 .sp
35 .ne 2
36 .na
37 \fB\fB-l\fR [\fB-c\fR \fIdev-class\fR | \fIdevice\fR]\fR
38 .ad
39 .RS 30n
40 Lists the pathnames of the device special files associated with the
41 \fIdevice\fR that are allocatable to the current process.
42 .sp
43 If \fIdev-class\fR is specified, lists only the files associated with all
44 devices of the specified device class.
45 .sp
46 If \fIdevice\fR is specified, lists only the files associated with the
47 specified device.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fB-n\fR [\fB-c\fR \fIdev-class\fR | \fIdevice\fR]\fR
54 .ad
55 .RS 30n
56 Lists the pathnames of the device special files associated with the device that
57 are allocatable to the current process but are not currently allocated.
58 .sp
59 If \fIdev-class\fR is specified, lists only the files associated with all
60 devices of the specified device class.
61 .sp
62 If \fIdevice\fR is specified, lists only the files associated with the
63 specified device.
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fB-s\fR\fR
70 .ad
71 .RS 30n
72 Silent. Suppresses any diagnostic output.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fB-u\fR [\fB-c\fR \fIdev-class\fR | \fIdevice\fR]\fR
79 .ad
80 .RS 30n
81 Lists the pathnames of device special files associated with the device that are
82 allocated to the owner of the current process.
83 .sp
84 If \fIdev-class\fR is specified, lists only the files associated with all
85 devices of the specified device class.
86 .sp
87 If \fIdevice\fR is specified, lists only the files associated with the
88 specified device.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fB-U\fR \fIuid\fR\fR
95 .ad
96 .RS 30n
97 Uses the user \fBID\fR \fIuid\fR instead of the real user \fBID\fR of the
98 current process when performing the \fBlist_devices\fR operation. Only a user
99 with the \fBsolaris.device.revoke\fR authorization can use this option.
102 .SH EXAMPLES
104 Listing All Devices
107 The following example lists all devices available to the caller for allocation:
110 .in +2
112 % list_devices -l
113 device: audio type: audio \e
114 files: /dev/audio /dev/audioctl /dev/sound/0 /dev/sound/0ctl
116 .in -2
119 .SH EXIT STATUS
121 The following exit values are returned:
123 .ne 2
125 \fB\fB0\fR\fR
127 .RS 15n
128 Successful completion.
132 .ne 2
134 \fB\fB20\fR\fR
136 .RS 15n
137 No entry for the specified device.
141 .ne 2
143 \fB\fIother value\fR\fR
145 .RS 15n
146 An error occurred.
149 .SH FILES
151 \fB/etc/security/device_allocate\fR
154 \fB/etc/security/device_maps\fR
157 \fB/etc/security/dev/*\fR
160 \fB/usr/security/lib/*\fR
161 .SH ATTRIBUTES
163 See \fBattributes\fR(5) for descriptions of the following attributes:
168 box;
169 c | c
170 l | l .
171 ATTRIBUTE TYPE  ATTRIBUTE VALUE
173 Interface Stability     See below.
178 The invocation is Uncommitted. The options are Uncommitted. The output from the
179 \fB-a\fR and \fB-w\fR options is Uncommitted. All other output is
180 Not-an-Interface.
181 .SH SEE ALSO
183 \fBallocate\fR(1), \fBdeallocate\fR(1), \fBdminfo\fR(8),
184 \fBmkdevalloc\fR(8), \fBmkdevmaps\fR(8), \fBdevice_allocate\fR(4),
185 \fBdevice_maps\fR(4), \fBattributes\fR(5)
186 .SH NOTES
188 \fB/etc/security/dev\fR, \fBmkdevalloc\fR(8), and \fBmkdevmaps\fR(8) might
189 not be supported in a future release of the Solaris Operating Environment.