xref: /xnu-10063.121.3/osfmk/man/device_set_status.html (revision 2c2f96dc2b9a4408a43d3150ae9c105355ca3daa)
1*2c2f96dcSApple OSS Distributions<h2>device_set_status</h2>
2*2c2f96dcSApple OSS Distributions<hr>
3*2c2f96dcSApple OSS Distributions<p>
4*2c2f96dcSApple OSS Distributions<strong>Function</strong> - Set 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_set_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 manipulated.
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 to set.
27*2c2f96dcSApple OSS Distributions<p>
28*2c2f96dcSApple OSS Distributions<dt> <var>status</var>
29*2c2f96dcSApple OSS Distributions<dd>
30*2c2f96dcSApple OSS Distributions[pointer to in array of natural-sized units]
31*2c2f96dcSApple OSS DistributionsThe status information to set.
32*2c2f96dcSApple OSS Distributions<p>
33*2c2f96dcSApple OSS Distributions<dt> <var>status_count</var>
34*2c2f96dcSApple OSS Distributions<dd>
35*2c2f96dcSApple OSS Distributions[in scalar]
36*2c2f96dcSApple OSS DistributionsThe size of the status information (in natural-sized units).
37*2c2f96dcSApple OSS Distributions</dl>
38*2c2f96dcSApple OSS Distributions<h3>DESCRIPTION</h3>
39*2c2f96dcSApple OSS Distributions<p>
40*2c2f96dcSApple OSS DistributionsThe <strong>device_set_status</strong> function sets device status.
41*2c2f96dcSApple OSS DistributionsThe possible values of <var>flavor</var>
42*2c2f96dcSApple OSS Distributionsas well as the corresponding meanings are device dependent.
43*2c2f96dcSApple OSS Distributions<h3>RETURN VALUES</h3>
44*2c2f96dcSApple OSS Distributions<dl>
45*2c2f96dcSApple OSS Distributions<p>
46*2c2f96dcSApple OSS Distributions<dt> <strong>D_DEVICE_DOWN</strong>
47*2c2f96dcSApple OSS Distributions<dd>
48*2c2f96dcSApple OSS DistributionsDevice has been shut down
49*2c2f96dcSApple OSS Distributions<p>
50*2c2f96dcSApple OSS Distributions<dt> <strong>D_IO_ERROR</strong>
51*2c2f96dcSApple OSS Distributions<dd>
52*2c2f96dcSApple OSS DistributionsHardware I/O error
53*2c2f96dcSApple OSS Distributions<p>
54*2c2f96dcSApple OSS Distributions<dt> <strong>D_NO_SUCH_DEVICE</strong>
55*2c2f96dcSApple OSS Distributions<dd>
56*2c2f96dcSApple OSS DistributionsNo device with that name, or the device is not operational.
57*2c2f96dcSApple OSS Distributions<p>
58*2c2f96dcSApple OSS Distributions<dt> <strong>D_OUT_OF_BAND</strong>
59*2c2f96dcSApple OSS Distributions<dd>
60*2c2f96dcSApple OSS DistributionsOut-of-band condition occurred on device (such as typing
61*2c2f96dcSApple OSS Distributions     <strong>&ltCtrl&gt-C</strong>).
62*2c2f96dcSApple OSS Distributions<p>
63*2c2f96dcSApple OSS Distributions<dt> <strong>D_READ_ONLY</strong>
64*2c2f96dcSApple OSS Distributions<dd>
65*2c2f96dcSApple OSS DistributionsData cannot be written to this device.
66*2c2f96dcSApple OSS Distributions</dl>
67*2c2f96dcSApple OSS Distributions<h3>RELATED INFORMATION</h3>
68*2c2f96dcSApple OSS Distributions<p>
69*2c2f96dcSApple OSS DistributionsFunctions:
70*2c2f96dcSApple OSS Distributions<a href="device_get_status.html"><strong>device_get_status</strong></a>.
71