Directed write mode failure message to libburn queue, repaired wrote_well

This commit is contained in:
Thomas Schmitt 2007-10-20 17:06:51 +00:00
parent 00eba3c5d6
commit b09ff95b4e
2 changed files with 11 additions and 12 deletions

View File

@ -286,10 +286,10 @@ int isoburn_disc_track_lba_nwa(struct burn_drive *d,
void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
{
int ret, multi= 1;
int ret;
struct isoburn *o;
struct burn_drive *drive;
char reasons[BURN_REASONS_LEN];
char reasons[BURN_REASONS_LEN],msg[160+BURN_REASONS_LEN];
enum burn_write_types write_type;
drive= burn_write_opts_get_drive(opts);
@ -299,21 +299,20 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
if(o!=NULL) {
o->wrote_well= -1;
if(o->emulation_mode!=0) {
multi= 0;
burn_write_opts_set_multi(opts, 0);
if(o->emulation_mode>0 && o->nwa >= 0)
burn_write_opts_set_start_byte(opts, ((off_t) o->nwa) * (off_t) 2048);
}
}
/* fprintf(stderr, "isoburn_EXPERIMENTAL: multi = %d\n", multi); */
/* burn_write_opts_set_simulate(opts, 1); */
burn_write_opts_set_multi(opts, multi);
write_type= burn_write_opts_auto_write_type(opts, disc, reasons, 0);
if (write_type == BURN_WRITE_NONE) {
fprintf(stderr, "Failed to find a suitable write mode:\n%s\n", reasons);
sprintf(msg, "Failed to find a suitable write mode:\n%s", reasons);
burn_msgs_submit(0, msg, 0, "SORRY", NULL);
if(o!=NULL)
o->wrote_well= 0;
/* To cause a negative reply with burn_drive_wrote_well() */
burn_drive_cancel(drive);
return;
}
@ -430,7 +429,7 @@ int isoburn_drive_wrote_well(struct burn_drive *d)
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0)
return(-1);
if(ret>0)
if(o!=NULL)
if(o->wrote_well>=0)
return(o->wrote_well);
ret= burn_drive_wrote_well(d);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2007.10.19.204155"
#define Xorriso_timestamP "2007.10.20.170731"