From 2b9bbbc7e14d14e92aafea98445c468708e588cf Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 9 May 2008 20:54:58 +0000 Subject: [PATCH] Trying to better handle non ISO images on -indev --- libisoburn/trunk/libisoburn/isofs_wrap.c | 13 ++++++++++--- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libisoburn/trunk/libisoburn/isofs_wrap.c b/libisoburn/trunk/libisoburn/isofs_wrap.c index 8368bb6b..8d94777d 100644 --- a/libisoburn/trunk/libisoburn/isofs_wrap.c +++ b/libisoburn/trunk/libisoburn/isofs_wrap.c @@ -12,6 +12,7 @@ #include #include +#include #ifndef Xorriso_standalonE @@ -111,11 +112,11 @@ int isoburn_read_image(struct burn_drive *d, struct isoburn_read_opts *read_opts, IsoImage **image) { - int ret, int_num; + int ret, int_num, dummy; IsoReadOpts *ropts= NULL; IsoReadImageFeatures *features= NULL; uint32_t ms_block; - + char msg[160]; enum burn_disc_status status= BURN_DISC_BLANK; IsoDataSource *ds= NULL; struct isoburn *o= NULL; @@ -133,7 +134,7 @@ int isoburn_read_image(struct burn_drive *d, status = isoburn_disc_get_status(d); } if (d == NULL || status == BURN_DISC_BLANK || read_opts->pretend_blank) { - +create_blank_image:; /* * Blank disc, we create a new image without files. */ @@ -181,6 +182,12 @@ int isoburn_read_image(struct burn_drive *d, if (ret <= 0) return -2; ms_block= int_num; + ret = isoburn_read_iso_head(d, int_num, &dummy, NULL, 0); + if (ret <= 0) { + sprintf(msg, "No ISO 9660 image at LBA %d. Creating blank image.", int_num); + burn_msgs_submit(0x00060000, msg, 0, "WARNING", NULL); + goto create_blank_image; + } /* create the data source */ ret = iso_read_opts_new(&ropts, 0); diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 8bf14fce..0846fef8 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.05.08.185350" +#define Xorriso_timestamP "2008.05.09.205517"