Bug fix: xorriso did not blank CD-RW with images that were prepared on hard disk

master
Thomas Schmitt 13 years ago
parent 249190ede2
commit f39b0be7d6
  1. 18
      libisoburn/burn_wrap.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -562,19 +562,26 @@ int isoburn_disc_erasable(struct burn_drive *d)
void isoburn_disc_erase(struct burn_drive *drive, int fast)
{
int ret;
int ret, do_pseudo_blank= 0;
struct isoburn *o;
enum burn_disc_status s;
char zero_buffer[Libisoburn_target_head_sizE];
struct burn_multi_caps *caps= NULL;
ret= isoburn_find_emulator(&o, drive, 0);
if(ret>0) {
if(o->emulation_mode==-1) {
/* To cause a negative reply with burn_drive_wrote_well() */
burn_drive_cancel(drive);
return;
goto ex;
}
if(o->emulation_mode > 0) { /* might be readonly with emulated sessions */
ret= burn_disc_get_multi_caps(drive, BURN_WRITE_NONE, &caps, 0);
if(ret > 0 && caps->start_adr)
do_pseudo_blank= 1;
}
if(o->emulation_mode>0) {
if(do_pseudo_blank) {
s= isoburn_disc_get_status(drive);
if(s==BURN_DISC_FULL) { /* unknown data format in first 64 kB */
memset(zero_buffer, 0, Libisoburn_target_head_sizE);
@ -585,10 +592,13 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast)
}
if(ret<=0)
burn_drive_cancel(drive); /* mark run as failure */
return;
goto ex;
}
}
burn_disc_erase(drive, fast);
ex:;
if(caps!=NULL)
burn_disc_free_multi_caps(&caps);
}

@ -1 +1 @@
#define Xorriso_timestamP "2010.01.11.113457"
#define Xorriso_timestamP "2010.01.17.145019"

Loading…
Cancel
Save