|
|
|
@ -88,6 +88,9 @@ int isoburn_read_volset(struct burn_drive *d, struct isoburn_read_opts *read_opt
|
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO replace with isoburn_disc_get_status()
|
|
|
|
|
// Check for suitable FULL or APPENDABLE status. Full only useful for image
|
|
|
|
|
// modification
|
|
|
|
|
if (o->fabricated_disc_status == BURN_DISC_BLANK) { |
|
|
|
|
// FIXME construct an empty volset!!
|
|
|
|
|
*volset = NULL; |
|
|
|
@ -139,38 +142,24 @@ int isoburn_activate_session(struct burn_drive *drive)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Allocate and initialize memory for libisofs related objects in
|
|
|
|
|
struct isoburn. |
|
|
|
|
@param o A freshly created isoburn object with NULL pointers |
|
|
|
|
/** Create a new data source suitable for reading from the given drive.
|
|
|
|
|
@param o A freshly created isoburn object, without any data_source |
|
|
|
|
(src field == NULL), but with the drive field set. |
|
|
|
|
@return <=0 error , 1 = success |
|
|
|
|
*/ |
|
|
|
|
int isoburn_new_rwopts(struct isoburn *o) |
|
|
|
|
int isoburn_create_data_source(struct isoburn *o) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
// FIXME
|
|
|
|
|
/* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
|
|
|
* This should call isoburn_data_source_new(), that now is in |
|
|
|
|
* isoburn_start_emulation(). That is wrong, as for true ms discs
|
|
|
|
|
* isoburn_start_emulation() is never called, and thus we haven't a |
|
|
|
|
* source for read previous session volset. |
|
|
|
|
* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/* create and initialize the data source */ |
|
|
|
|
// o->src = isoburn_data_source_new(o->drive);
|
|
|
|
|
// if (!o->src)
|
|
|
|
|
// return -1;
|
|
|
|
|
|
|
|
|
|
return 1; |
|
|
|
|
o->src = isoburn_data_source_new(o->drive); |
|
|
|
|
return (o->src ? 1 : -1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Dispose memory objects created by isoburn_new_rwopts(). This function
|
|
|
|
|
expect that the pointers in struct isoburn might still be NULL, i.e. |
|
|
|
|
that isoburn_new_rwopts() was not called before. |
|
|
|
|
/** Dispose the data source created by isoburn_create_data_source().
|
|
|
|
|
@return <=0 error , 1 = success |
|
|
|
|
*/ |
|
|
|
|
int isoburn_free_rwopts(struct isoburn *o) |
|
|
|
|
int isoburn_free_data_source(struct isoburn *o) |
|
|
|
|
{ |
|
|
|
|
if (o->src) |
|
|
|
|
data_source_free(o->src); |
|
|
|
@ -180,7 +169,7 @@ int isoburn_free_rwopts(struct isoburn *o)
|
|
|
|
|
|
|
|
|
|
/** Initialize the emulation of multi-session on random access media.
|
|
|
|
|
The need for emulation is confirmed already. |
|
|
|
|
@param o A freshly created isoburn object. isoburn_new_rwopts() was |
|
|
|
|
@param o A freshly created isoburn object. isoburn_create_data_source() was |
|
|
|
|
already called, nevertheless. |
|
|
|
|
@return <=0 error , 1 = success |
|
|
|
|
*/ |
|
|
|
@ -206,13 +195,6 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO remove >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
|
/* create and initialize the data source */ |
|
|
|
|
o->src = isoburn_data_source_new(o->drive); |
|
|
|
|
if (!o->src) |
|
|
|
|
return -1; |
|
|
|
|
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
|
|
|
|
|
|
|
|
/* check first 64K. If 0's, the disc is treated as a blank disc, and thus
|
|
|
|
|
overwritten without extra check. */ |
|
|
|
|
i = sizeof(o->target_iso_head); |
|
|
|
|