Adjusted ds_read_block() to inofficial libisofs expectations

This commit is contained in:
Thomas Schmitt 2008-05-01 17:41:58 +00:00
parent a4c4026446
commit 19e803ba0d
2 changed files with 19 additions and 5 deletions

View File

@ -132,12 +132,26 @@ int ds_read_block(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
if (ret > 0)
return 1;
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);
/* It is not required by the specs of libisofs but implicitely assumed ...
/* It is not required by the specs of libisofs but implicitely assumed
...
But it is not possible to ignore FAILURE. So the original libisofs
error code is patched to deliver MISHAP in order to give a minimal
choice.
libisofs insists in original error codes, so libisoburn cannot
change severity FAILURE associated with ISO_FILE_READ_ERROR.
So ISO_FILE_READ_ERROR is not an option and libisoburn has to
misuse ISO_FILE_CANT_WRITE, which is actually for image generation
and not for image reading.
This is quite wrong, although the error message text is unclear
enough to make it appear plausible.
*/
return ((int) ISO_FILE_READ_ERROR);
ret= ISO_FILE_CANT_WRITE;
if(ret >= 0)
ret = -1;
sprintf(msg, "ds_read_block(%lu) returns %d", (unsigned long) lba, ret);
burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL);
return ret;
}
#ifdef Libisoburn_read_cache_reporT

View File

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