]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/device_get_status.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / device_get_status.html
CommitLineData
9bccf70c 1<h2>device_get_status</h2>\r<hr>\r<p>\r<strong>Function</strong> - Return the current device status.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>#include&lt device/device.h&gt</strong>\r\r<strong>kern_return_t device_get_status</strong>\r <strong>(mach_port_t</strong> <var>device</var>,\r <strong>dev_flavor_t</strong> <var>flavor</var>,\r <strong>dev_status_t</strong> <var>status</var>,\r <strong>mach_msg_type_number_t</strong> <var>*status_count</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>device</var> \r<dd>\r[in device send right]\rA device port to the device to be interrogated.\r<p>\r<dt> <var>flavor</var> \r<dd>\r[in scalar]\rThe type of status information requested.\r<p>\r<dt> <var>status</var> \r<dd>\r[out array of natural-sized units]\rThe returned device status.\r<p>\r<dt> <var>status_count</var> \r<dd>\r[pointer to in/out scalar]\rOn input, the reserved size of <var>status</var>; on\routput, the size of the returned device status (in natural-sized units).\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>device_get_status</strong> function returns status information\rpertaining to an open device. The possible values for <var>flavor</var> as well \ras the meaning of the returned status information is device dependent.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>D_DEVICE_DOWN</strong>\r<dd>\rDevice has been shut down\r<p>\r<dt> <strong>D_NO_SUCH_DEVICE</strong>\r<dd>\rNo device with that name, or the device is not operational.\r<p>\r<dt> <strong>D_OUT_OF_BAND</strong>\r<dd>\rOut-of-band condition occurred on device (such as typing \*L<Ctrl>-C\*O)\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="device_set_status.html"><strong>device_set_status</strong></a>.\r