Bug fix: Since 1.0.6: Unreadable image produced by: xorrisofs ... >image.iso

This commit is contained in:
Thomas Schmitt 2011-07-07 11:44:45 +00:00
parent 0013855a47
commit 4df5698e57
4 changed files with 14 additions and 5 deletions

View File

@ -488,6 +488,8 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
ret= burn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa); ret= burn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
if(ret>0) if(ret>0)
(*o)->nwa= nwa; (*o)->nwa= nwa;
if((*o)->nwa < (*o)->zero_nwa)
(*o)->zero_nwa= 0;
#endif #endif
} }
@ -675,7 +677,7 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast)
to zero size and change its state */ to zero size and change its state */
burn_disc_erase(drive, fast); burn_disc_erase(drive, fast);
o->fabricated_disc_status= burn_disc_get_status(drive); o->fabricated_disc_status= burn_disc_get_status(drive);
o->nwa= 0; o->nwa= o->zero_nwa= 0;
goto ex; goto ex;
} }
if(o->emulation_mode > 0) { /* might be readonly with emulated sessions */ if(o->emulation_mode > 0) { /* might be readonly with emulated sessions */
@ -1006,6 +1008,8 @@ int isoburn_set_start_byte(struct isoburn *o, off_t value, int flag)
if(value % caps->start_alignment) if(value % caps->start_alignment)
value+= caps->start_alignment - (value % caps->start_alignment); value+= caps->start_alignment - (value % caps->start_alignment);
o->nwa= value/2048; o->nwa= value/2048;
if(o->nwa < o->zero_nwa)
o->zero_nwa= 0;
/* If suitable for media alignment, round up to Libisoburn_nwa_alignemenT */ /* If suitable for media alignment, round up to Libisoburn_nwa_alignemenT */
if((o->nwa % Libisoburn_nwa_alignemenT) && if((o->nwa % Libisoburn_nwa_alignemenT) &&
((Libisoburn_nwa_alignemenT*2048) % caps->start_alignment)==0 ) ((Libisoburn_nwa_alignemenT*2048) % caps->start_alignment)==0 )

View File

@ -519,6 +519,8 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
ret= isoburn_adjust_target_iso_head(out_o, opts->partition_offset, 0); ret= isoburn_adjust_target_iso_head(out_o, opts->partition_offset, 0);
if(ret <= 0) if(ret <= 0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
if(out_o->nwa < out_o->zero_nwa)
out_o->zero_nwa= 0;
if(opts->no_emul_toc || opts->libjte_handle != NULL) { if(opts->no_emul_toc || opts->libjte_handle != NULL) {
if(out_o->nwa == out_o->zero_nwa && if(out_o->nwa == out_o->zero_nwa &&
out_o->zero_nwa == Libisoburn_overwriteable_starT out_o->zero_nwa == Libisoburn_overwriteable_starT
@ -535,6 +537,12 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
if (ret != 1) { if (ret != 1) {
isoburn_msgs_submit(out_o, 0x00060000, isoburn_msgs_submit(out_o, 0x00060000,
"Cannot determine next writeable address", 0, "FAILURE", 0); "Cannot determine next writeable address", 0, "FAILURE", 0);
/* >>> NWA_V : If burn_next_track_damaged:
??? Close track and session ?
??? Issue a hint for a repair command ?
*/;
{ret= -3; goto ex;} {ret= -3; goto ex;}
} }
iso_write_opts_set_ms_block(wopts, nwa); iso_write_opts_set_ms_block(wopts, nwa);

View File

@ -496,11 +496,8 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
s = burn_disc_get_status(drive); s = burn_disc_get_status(drive);
o->fabricated_disc_status= s; o->fabricated_disc_status= s;
burn_disc_track_lba_nwa(drive, NULL, 0, &dummy, &(o->nwa)); burn_disc_track_lba_nwa(drive, NULL, 0, &dummy, &(o->nwa));
/* >>> Debian Bug#632865 ? */
if(o->nwa < o->zero_nwa) if(o->nwa < o->zero_nwa)
o->zero_nwa= 0; o->zero_nwa= 0;
{ret= 1; goto ex;} {ret= 1; goto ex;}
} else if (capacity > 0 || role == 2 || role == 4) { } else if (capacity > 0 || role == 2 || role == 4) {
/* Might be a block device on a system where libburn cannot determine its /* Might be a block device on a system where libburn cannot determine its

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.07.06.190111" #define Xorriso_timestamP "2011.07.07.113930"