1 <h2>device_get_status
</h2>
4 <strong>Function
</strong> - Return the current device status.
7 <strong>#include< device/device.h>
</strong>
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>
18 <dt> <var>device
</var>
20 [in device send right]
21 A device port to the device to be interrogated.
23 <dt> <var>flavor
</var>
26 The type of status information requested.
28 <dt> <var>status
</var>
30 [out array of natural-sized units]
31 The returned device status.
33 <dt> <var>status_count
</var>
35 [pointer to in/out scalar]
36 On input, the reserved size of
<var>status
</var>; on
37 output, the size of the returned device status (in natural-sized units).
41 The
<strong>device_get_status
</strong> function returns status information
42 pertaining to an open device. The possible values for
<var>flavor
</var> as well
43 as the meaning of the returned status information is device dependent.
44 <h3>RETURN VALUES
</h3>
47 <dt> <strong>D_DEVICE_DOWN
</strong>
49 Device has been shut down
51 <dt> <strong>D_NO_SUCH_DEVICE
</strong>
53 No device with that name, or the device is not operational.
55 <dt> <strong>D_OUT_OF_BAND
</strong>
57 Out-of-band condition occurred on device (such as typing \*L
<Ctrl>-C\*O)
59 <h3>RELATED INFORMATION
</h3>
62 <a href=
"device_set_status.html"><strong>device_set_status
</strong></a>.