xref: /xnu-8792.41.9/osfmk/man/device_read_overwrite.html (revision 5c2921b07a2480ab43ec66f5b9e41cb872bc554f)
1*5c2921b0SApple OSS Distributions<h2>device_read_overwrite</h2>
2*5c2921b0SApple OSS Distributions<hr>
3*5c2921b0SApple OSS Distributions<p><strong>System Trap</strong> -- Read a sequence of bytes from a specific device into my address space.
4*5c2921b0SApple OSS Distributions<h3>SYNOPSIS</h3>
5*5c2921b0SApple OSS Distributions<pre>
6*5c2921b0SApple OSS Distributions
7*5c2921b0SApple OSS Distributions<strong>kern_return_t   device_read_overwrite</strong>
8*5c2921b0SApple OSS Distributions                <strong>(mach_port_t</strong>                               <var>device</var>,
9*5c2921b0SApple OSS Distributions                 <strong>dev_mode_t</strong>                                <var>mode</var>,
10*5c2921b0SApple OSS Distributions                 <strong>recnum_t</strong>                                <var>recnum</var>,
11*5c2921b0SApple OSS Distributions                 <strong>io_buf_len_t</strong>                      <var>bytes_wanted</var>,
12*5c2921b0SApple OSS Distributions                 <strong>io_buf_pointer_t</strong>                          <var>data</var>,
13*5c2921b0SApple OSS Distributions                 <strong>mach_msg_type_number_t</strong>              <var>data_count</var><strong>);</strong>
14*5c2921b0SApple OSS Distributions
15*5c2921b0SApple OSS Distributions
16*5c2921b0SApple OSS Distributions
17*5c2921b0SApple OSS Distributions<strong>kern_return_t   device_read_overwrite_request</strong>
18*5c2921b0SApple OSS Distributions                <strong>(mach_port_t</strong>                             <var>device</var>,
19*5c2921b0SApple OSS Distributions                 <strong>mach_port_t</strong>                         <var>reply_port</var>,
20*5c2921b0SApple OSS Distributions                 <strong>dev_mode_t</strong>                                <var>mode</var>,
21*5c2921b0SApple OSS Distributions                 <strong>recnum_t</strong>                                <var>recnum</var>,
22*5c2921b0SApple OSS Distributions                 <strong>io_buf_len_t</strong>                      <var>bytes_wanted</var>,
23*5c2921b0SApple OSS Distributions                 <strong>io_buf_pointer_t</strong>                          <var>data</var><strong>);</strong>
24*5c2921b0SApple OSS Distributions
25*5c2921b0SApple OSS Distributions
26*5c2921b0SApple OSS Distributions
27*5c2921b0SApple OSS Distributions<strong>kern_return_t   ds_device_read_reply_overwrite</strong>
28*5c2921b0SApple OSS Distributions                <strong>(mach_port_t</strong>                        <var>reply_port</var>,
29*5c2921b0SApple OSS Distributions                 <strong>kern_return_t</strong>                      <var>return_code</var>,
30*5c2921b0SApple OSS Distributions                 <strong>io_buf_len_t</strong>                        <var>data_count</var><strong>);</strong>
31*5c2921b0SApple OSS Distributions</pre>
32*5c2921b0SApple OSS Distributions<h3>PARAMETERS</h3>
33*5c2921b0SApple OSS Distributions<dl>
34*5c2921b0SApple OSS Distributions<p>
35*5c2921b0SApple OSS Distributions<dt> <var>device</var>
36*5c2921b0SApple OSS Distributions<dd>
37*5c2921b0SApple OSS Distributions[in device send right]
38*5c2921b0SApple OSS DistributionsA device port to the device to be read.
39*5c2921b0SApple OSS Distributions<p>
40*5c2921b0SApple OSS Distributions<dt> <var>reply_port</var>
41*5c2921b0SApple OSS Distributions<dd>
42*5c2921b0SApple OSS Distributions[in reply receive (to be converted to send-once) right]
43*5c2921b0SApple OSS DistributionsThe port to
44*5c2921b0SApple OSS Distributionswhich the reply message is to be sent.
45*5c2921b0SApple OSS Distributions<p>
46*5c2921b0SApple OSS Distributions<dt> <var>mode</var>
47*5c2921b0SApple OSS Distributions<dd>
48*5c2921b0SApple OSS Distributions[in scalar]
49*5c2921b0SApple OSS DistributionsI/O mode value.  Meaningful options are:
50*5c2921b0SApple OSS Distributions<dl>
51*5c2921b0SApple OSS Distributions<p>
52*5c2921b0SApple OSS Distributions<dt> <strong>D_NOWAIT</strong>
53*5c2921b0SApple OSS Distributions<dd>
54*5c2921b0SApple OSS DistributionsDo not wait if data is unavailable.
55*5c2921b0SApple OSS Distributions</dl>
56*5c2921b0SApple OSS Distributions<p>
57*5c2921b0SApple OSS Distributions<dt> <var>recnum</var>
58*5c2921b0SApple OSS Distributions<dd>
59*5c2921b0SApple OSS Distributions[in scalar]
60*5c2921b0SApple OSS DistributionsRecord number to be read.
61*5c2921b0SApple OSS Distributions<p>
62*5c2921b0SApple OSS Distributions<dt> <var>bytes_wanted</var>
63*5c2921b0SApple OSS Distributions<dd>
64*5c2921b0SApple OSS Distributions[in scalar]
65*5c2921b0SApple OSS DistributionsSize of data transfer.
66*5c2921b0SApple OSS Distributions<p>
67*5c2921b0SApple OSS Distributions<dt> <var>return_code</var>
68*5c2921b0SApple OSS Distributions<dd>
69*5c2921b0SApple OSS Distributions[in scalar]
70*5c2921b0SApple OSS DistributionsThe return status code from the read.
71*5c2921b0SApple OSS Distributions<p>
72*5c2921b0SApple OSS Distributions<dt> <var>data</var>
73*5c2921b0SApple OSS Distributions<dd>
74*5c2921b0SApple OSS Distributions[pointer to in array of bytes]
75*5c2921b0SApple OSS DistributionsData buffer to be overwritten.
76*5c2921b0SApple OSS Distributions<p>
77*5c2921b0SApple OSS Distributions<dt> <var>data_count</var>
78*5c2921b0SApple OSS Distributions<dd>
79*5c2921b0SApple OSS Distributions[out scalar, in for asynchronous form]
80*5c2921b0SApple OSS DistributionsNumber of returned data bytes.
81*5c2921b0SApple OSS Distributions</dl>
82*5c2921b0SApple OSS Distributions<h3>DESCRIPTION</h3>
83*5c2921b0SApple OSS Distributions<p>
84*5c2921b0SApple OSS DistributionsThe <strong>device_read_overwrite</strong> system trap reads a sequence
85*5c2921b0SApple OSS Distributionsof bytes from a
86*5c2921b0SApple OSS Distributionsdevice object directly into the caller's address space.  The
87*5c2921b0SApple OSS Distributionsmeaning of <var>recnum</var> as
88*5c2921b0SApple OSS Distributionswell as the specific operation performed is device dependent.
89*5c2921b0SApple OSS Distributions<h3>NOTES</h3>
90*5c2921b0SApple OSS Distributions<p>
91*5c2921b0SApple OSS DistributionsThe <strong>device_read_overwrite_request</strong> and <strong>device_read_reply_overwrite</strong>
92*5c2921b0SApple OSS Distributionscalls may be removed from the interface in favor of new asynchronous support.
93*5c2921b0SApple OSS Distributions<h3>RETURN VALUES</h3>
94*5c2921b0SApple OSS Distributions<p>
95*5c2921b0SApple OSS DistributionsOnly generic errors apply.
96*5c2921b0SApple OSS Distributions<h3>RELATED INFORMATION</h3>
97*5c2921b0SApple OSS Distributions<p>
98*5c2921b0SApple OSS DistributionsFunctions:
99*5c2921b0SApple OSS Distributions<a href="device_read.html"><strong>device_read</strong></a>,
100*5c2921b0SApple OSS Distributions<a href="device_read_inband.html"><strong>device_read_inband</strong></a>,
101*5c2921b0SApple OSS Distributions<a href="device_reply_server.html"><strong>device_reply_server</strong></a>.
102