]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/device_get_status.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / device_get_status.html
CommitLineData
13fec989
A
1<h2>device_get_status</h2>
2<hr>
3<p>
4<strong>Function</strong> - Return the current device status.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>#include&lt device/device.h&gt</strong>
8
9<strong>kern_return_t device_get_status</strong>
10 <strong>(mach_port_t</strong> <var>device</var>,
11 <strong>dev_flavor_t</strong> <var>flavor</var>,
12 <strong>dev_status_t</strong> <var>status</var>,
13 <strong>mach_msg_type_number_t</strong> <var>*status_count</var><strong>);</strong>
14</pre>
15<h3>PARAMETERS</h3>
16<dl>
17<p>
18<dt> <var>device</var>
19<dd>
20[in device send right]
21A device port to the device to be interrogated.
22<p>
23<dt> <var>flavor</var>
24<dd>
25[in scalar]
26The type of status information requested.
27<p>
28<dt> <var>status</var>
29<dd>
30[out array of natural-sized units]
31The returned device status.
32<p>
33<dt> <var>status_count</var>
34<dd>
35[pointer to in/out scalar]
36On input, the reserved size of <var>status</var>; on
37output, the size of the returned device status (in natural-sized units).
38</dl>
39<h3>DESCRIPTION</h3>
40<p>
41The <strong>device_get_status</strong> function returns status information
42pertaining to an open device. The possible values for <var>flavor</var> as well
43as the meaning of the returned status information is device dependent.
44<h3>RETURN VALUES</h3>
45<dl>
46<p>
47<dt> <strong>D_DEVICE_DOWN</strong>
48<dd>
49Device has been shut down
50<p>
51<dt> <strong>D_NO_SUCH_DEVICE</strong>
52<dd>
53No device with that name, or the device is not operational.
54<p>
55<dt> <strong>D_OUT_OF_BAND</strong>
56<dd>
57Out-of-band condition occurred on device (such as typing \*L<Ctrl>-C\*O)
58</dl>
59<h3>RELATED INFORMATION</h3>
60<p>
61Functions:
62<a href="device_set_status.html"><strong>device_set_status</strong></a>.