|
|
|
@ -96,6 +96,12 @@ int isoburn_read_volset(struct burn_drive *d, struct isoburn_read_opts *read_opt
|
|
|
|
|
if (ret < 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (o->fabricated_disc_status == BURN_DISC_BLANK) {
|
|
|
|
|
// FIXME construct an empty volset!!
|
|
|
|
|
*volset = NULL;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ret = isoburn_disc_get_msc1(d, &ropts.block);
|
|
|
|
|
if (ret < 0)
|
|
|
|
|
return -1;
|
|
|
|
@ -216,9 +222,9 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|
|
|
|
/* sanity check */
|
|
|
|
|
if (pvm->vol_desc_type[0] != 1 || pvm->vol_desc_version[0] != 1
|
|
|
|
|
|| pvm->file_structure_version[0] != 1 ) {
|
|
|
|
|
// TODO unsupported image type, maybe not image or damaged image
|
|
|
|
|
// should this be an error?
|
|
|
|
|
return -2;
|
|
|
|
|
// TODO for now I treat this as a full disc
|
|
|
|
|
o->fabricated_disc_status= BURN_DISC_FULL;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!strncmp((char*)pvm->std_identifier, "CD001", 5)) {
|
|
|
|
@ -228,16 +234,16 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|
|
|
|
size = (off_t) iso_read_lsb(pvm->vol_space_size, 4);
|
|
|
|
|
size *= (off_t) 2048; /* block size in bytes */
|
|
|
|
|
isoburn_set_start_byte(o, size, 0);
|
|
|
|
|
o->fabricated_disc_status= BURN_DISC_APPENDABLE;
|
|
|
|
|
} else if (!strncmp((char*)pvm->std_identifier, "CDXX1", 5)) {
|
|
|
|
|
|
|
|
|
|
/* empty image */
|
|
|
|
|
isoburn_set_start_byte(o, (off_t) 0, 0);
|
|
|
|
|
o->fabricated_disc_status= BURN_DISC_BLANK;
|
|
|
|
|
} else {
|
|
|
|
|
// TODO not valid iso image
|
|
|
|
|
// should this be an error?
|
|
|
|
|
return -2;
|
|
|
|
|
// TODO for now I treat this as a full disc
|
|
|
|
|
o->fabricated_disc_status= BURN_DISC_FULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|