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

This commit is contained in:
Thomas Schmitt 2010-01-17 14:49:12 +00:00
parent 7220b8e0fe
commit ac7fa408a6
2 changed files with 15 additions and 5 deletions

View File

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

View File

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