|
|
|
@ -12,13 +12,22 @@
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
|
|
#ifndef Xorriso_standalonE
|
|
|
|
|
|
|
|
|
|
#include <libburn/libburn.h>
|
|
|
|
|
|
|
|
|
|
/* >>> NG */
|
|
|
|
|
#include <libisofs/nglibisofs.h>
|
|
|
|
|
|
|
|
|
|
#else /* ! Xorriso_standalonE */
|
|
|
|
|
|
|
|
|
|
#include "../libisofs/libisofs.h"
|
|
|
|
|
#include "../libburn/libburn.h"
|
|
|
|
|
|
|
|
|
|
#endif /* Xorriso_standalonE */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "isoburn.h"
|
|
|
|
|
#include "libisoburn.h"
|
|
|
|
|
|
|
|
|
@ -247,14 +256,15 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|
|
|
|
struct burn_drive *drive;
|
|
|
|
|
struct ecma119_pri_vol_desc *pvm;
|
|
|
|
|
|
|
|
|
|
assert(o);
|
|
|
|
|
if(o==NULL)
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
drive= o->drive;
|
|
|
|
|
|
|
|
|
|
/* we can assume 0 as start block for image */
|
|
|
|
|
/* TODO what about ms? where we validate valid iso image in ms disc? */
|
|
|
|
|
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
|
|
|
|
|
sizeof(o->target_iso_head), &data_count, 1);
|
|
|
|
|
sizeof(o->target_iso_head), &data_count, 2);
|
|
|
|
|
|
|
|
|
|
/* an error means an empty disc */
|
|
|
|
|
if (ret <= 0) {
|
|
|
|
|