From 572c83ade468eb3f3e74adb9c858e54b78b830de Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 1 May 2008 17:41:58 +0000 Subject: [PATCH] Adjusted ds_read_block() to inofficial libisofs expectations --- libisoburn/trunk/libisoburn/data_source.c | 22 ++++++++++++++++---- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/libisoburn/trunk/libisoburn/data_source.c b/libisoburn/trunk/libisoburn/data_source.c index b31ec54f..30f7d5c2 100644 --- a/libisoburn/trunk/libisoburn/data_source.c +++ b/libisoburn/trunk/libisoburn/data_source.c @@ -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 diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 8a4c43ab..69ea1f16 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.05.01.135421" +#define Xorriso_timestamP "2008.05.01.174110"