From 21b0ce468793a052f9ca5a170dfc0f4b18308d3b Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 1 May 2008 13:55:09 +0000 Subject: [PATCH] Adjusted ds_read_block() to inofficial libisofs expectations --- libisoburn/trunk/libisoburn/data_source.c | 11 +++++++++-- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libisoburn/trunk/libisoburn/data_source.c b/libisoburn/trunk/libisoburn/data_source.c index 540385fb..b31ec54f 100644 --- a/libisoburn/trunk/libisoburn/data_source.c +++ b/libisoburn/trunk/libisoburn/data_source.c @@ -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 diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index a231a62a..8a4c43ab 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.05.01.124248" +#define Xorriso_timestamP "2008.05.01.135421"