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