1<h2>device_set_status</h2>
2<hr>
3<p>
4<strong>Function</strong> - Set device status.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>#include&lt device/device.h&gt</strong>
8
9<strong>kern_return_t   device_set_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 manipulated.
22<p>
23<dt> <var>flavor</var> 
24<dd>
25[in scalar]
26The type of status information to set.
27<p>
28<dt> <var>status</var> 
29<dd>
30[pointer to in array of natural-sized units]
31The status information to set.
32<p>
33<dt> <var>status_count</var> 
34<dd>
35[in scalar]
36The size of the status information (in natural-sized units).
37</dl>
38<h3>DESCRIPTION</h3>
39<p>
40The <strong>device_set_status</strong> function sets device status.
41The possible values of <var>flavor</var> 
42as well as the corresponding meanings are device dependent.
43<h3>RETURN VALUES</h3>
44<dl>
45<p>
46<dt> <strong>D_DEVICE_DOWN</strong>
47<dd>
48Device has been shut down
49<p>
50<dt> <strong>D_IO_ERROR</strong>
51<dd>
52Hardware I/O error
53<p>
54<dt> <strong>D_NO_SUCH_DEVICE</strong>
55<dd>
56No device with that name, or the device is not operational.
57<p>
58<dt> <strong>D_OUT_OF_BAND</strong>
59<dd>
60Out-of-band condition occurred on device (such as typing
61     <strong>&ltCtrl&gt-C</strong>).
62<p>
63<dt> <strong>D_READ_ONLY</strong>
64<dd>
65Data cannot be written to this device.
66</dl>
67<h3>RELATED INFORMATION</h3>
68<p>
69Functions:
70<a href="device_get_status.html"><strong>device_get_status</strong></a>.
71