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