Trying to better handle non ISO images on -indev
This commit is contained in:
parent
de8de0faca
commit
2b9bbbc7e1
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifndef Xorriso_standalonE
|
#ifndef Xorriso_standalonE
|
||||||
|
|
||||||
@ -111,11 +112,11 @@ int isoburn_read_image(struct burn_drive *d,
|
|||||||
struct isoburn_read_opts *read_opts,
|
struct isoburn_read_opts *read_opts,
|
||||||
IsoImage **image)
|
IsoImage **image)
|
||||||
{
|
{
|
||||||
int ret, int_num;
|
int ret, int_num, dummy;
|
||||||
IsoReadOpts *ropts= NULL;
|
IsoReadOpts *ropts= NULL;
|
||||||
IsoReadImageFeatures *features= NULL;
|
IsoReadImageFeatures *features= NULL;
|
||||||
uint32_t ms_block;
|
uint32_t ms_block;
|
||||||
|
char msg[160];
|
||||||
enum burn_disc_status status= BURN_DISC_BLANK;
|
enum burn_disc_status status= BURN_DISC_BLANK;
|
||||||
IsoDataSource *ds= NULL;
|
IsoDataSource *ds= NULL;
|
||||||
struct isoburn *o= NULL;
|
struct isoburn *o= NULL;
|
||||||
@ -133,7 +134,7 @@ int isoburn_read_image(struct burn_drive *d,
|
|||||||
status = isoburn_disc_get_status(d);
|
status = isoburn_disc_get_status(d);
|
||||||
}
|
}
|
||||||
if (d == NULL || status == BURN_DISC_BLANK || read_opts->pretend_blank) {
|
if (d == NULL || status == BURN_DISC_BLANK || read_opts->pretend_blank) {
|
||||||
|
create_blank_image:;
|
||||||
/*
|
/*
|
||||||
* Blank disc, we create a new image without files.
|
* Blank disc, we create a new image without files.
|
||||||
*/
|
*/
|
||||||
@ -181,6 +182,12 @@ int isoburn_read_image(struct burn_drive *d,
|
|||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
return -2;
|
return -2;
|
||||||
ms_block= int_num;
|
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 */
|
/* create the data source */
|
||||||
ret = iso_read_opts_new(&ropts, 0);
|
ret = iso_read_opts_new(&ropts, 0);
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.05.08.185350"
|
#define Xorriso_timestamP "2008.05.09.205517"
|
||||||
|
Loading…
Reference in New Issue
Block a user