Adjusted ds_read_block() to inofficial libisofs expectations

This commit is contained in:
Thomas Schmitt 2008-05-01 13:55:09 +00:00
parent 68d70682dd
commit a4c4026446
2 changed files with 10 additions and 3 deletions

View File

@ -76,7 +76,11 @@ int ds_read_block(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
struct isoburn_cached_drive *icd;
if(src == NULL || buffer == NULL)
return -1;
/* It is not required by the specs of libisofs but implicitely assumed
by its current implementation that a data source read result <0 is
a valid libisofs error code.
*/
return ISO_NULL_POINTER;
icd = (struct isoburn_cached_drive *) src->data;
d = (struct burn_drive*) icd->drive;
@ -130,7 +134,10 @@ int ds_read_block(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
tiles[oldest].last_error_lba = lba;
sprintf(msg, "ds_read_block(%lu) returns -1", (unsigned long) lba);
burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL);
return -1;
/* It is not required by the specs of libisofs but implicitely assumed ...
*/
return ((int) ISO_FILE_READ_ERROR);
}
#ifdef Libisoburn_read_cache_reporT

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.05.01.124248"
#define Xorriso_timestamP "2008.05.01.135421"