pub unsafe extern "C" fn burn_read_data(
d: *mut burn_drive,
byte_address: off_t,
data: *mut c_char,
data_size: off_t,
data_count: *mut off_t,
flag: c_int,
) -> c_intExpand description
Read data in random access mode. The drive must be grabbed successfully before calling this function. With all currently supported drives and media the byte_address has to be aligned to 2048 bytes. Only data tracks with 2048 bytes per sector can be read this way. I.e. not CD-audio, not CD-video-stream … This is a synchronous call which returns only after the full read job has ended (successfully or not). So it is wise not to read giant amounts of data in a single call.
@param d The drive from which to read
@param byte_address The start address of the read in byte (aligned to 2048)
@param data A memory buffer capable of taking data_size bytes
@param data_size The amount of data to be read. This does not have to be aligned to any block size.
@param data_count The amount of data actually read (interesting on error) The counted bytes are supposed to be valid.
@param flag Bitfield for control purposes: bit0= - reserved - bit1= do not submit error message if read error bit2= on error do not try to read a second time with single block steps.
@since 0.5.2 bit3= return -2 on permission denied error rather than issuing a warning message.
@since 1.0.6 bit4= return -3 on SCSI error 5 64 00 ILLEGAL MODE FOR THIS TRACK and prevent this error from being reported as event message. Do not retry reading in this case. (Useful to try the last two blocks of a CD track which might be non-data because of TAO.)
@since 1.2.6 bit5= issue messages with severity DEBUG if they would be suppressed by bit1.
@since 1.4.0
@return 1=successful , <=0 an error occurred with bit3: -2= permission denied error
@since 0.4.0