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