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