From 4df5698e57c346d6069d0b63b5b0d7f8900a0d4a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 7 Jul 2011 11:44:45 +0000 Subject: [PATCH] Bug fix: Since 1.0.6: Unreadable image produced by: xorrisofs ... >image.iso --- libisoburn/trunk/libisoburn/burn_wrap.c | 6 +++++- libisoburn/trunk/libisoburn/isoburn.c | 8 ++++++++ libisoburn/trunk/libisoburn/isofs_wrap.c | 3 --- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/libisoburn/trunk/libisoburn/burn_wrap.c b/libisoburn/trunk/libisoburn/burn_wrap.c index fe5b40fc..ec376c15 100644 --- a/libisoburn/trunk/libisoburn/burn_wrap.c +++ b/libisoburn/trunk/libisoburn/burn_wrap.c @@ -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); if(ret>0) (*o)->nwa= nwa; + if((*o)->nwa < (*o)->zero_nwa) + (*o)->zero_nwa= 0; #endif } @@ -675,7 +677,7 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast) to zero size and change its state */ burn_disc_erase(drive, fast); o->fabricated_disc_status= burn_disc_get_status(drive); - o->nwa= 0; + o->nwa= o->zero_nwa= 0; goto ex; } 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) value+= caps->start_alignment - (value % caps->start_alignment); 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((o->nwa % Libisoburn_nwa_alignemenT) && ((Libisoburn_nwa_alignemenT*2048) % caps->start_alignment)==0 ) diff --git a/libisoburn/trunk/libisoburn/isoburn.c b/libisoburn/trunk/libisoburn/isoburn.c index d532ff11..1722d8b0 100644 --- a/libisoburn/trunk/libisoburn/isoburn.c +++ b/libisoburn/trunk/libisoburn/isoburn.c @@ -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); if(ret <= 0) {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(out_o->nwa == out_o->zero_nwa && 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) { isoburn_msgs_submit(out_o, 0x00060000, "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;} } iso_write_opts_set_ms_block(wopts, nwa); diff --git a/libisoburn/trunk/libisoburn/isofs_wrap.c b/libisoburn/trunk/libisoburn/isofs_wrap.c index 06fb12c3..4726ccca 100644 --- a/libisoburn/trunk/libisoburn/isofs_wrap.c +++ b/libisoburn/trunk/libisoburn/isofs_wrap.c @@ -496,11 +496,8 @@ int isoburn_start_emulation(struct isoburn *o, int flag) s = burn_disc_get_status(drive); o->fabricated_disc_status= s; burn_disc_track_lba_nwa(drive, NULL, 0, &dummy, &(o->nwa)); - - /* >>> Debian Bug#632865 ? */ if(o->nwa < o->zero_nwa) o->zero_nwa= 0; - {ret= 1; goto ex;} } else if (capacity > 0 || role == 2 || role == 4) { /* Might be a block device on a system where libburn cannot determine its diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index e28f4f22..aafa6df8 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.07.06.190111" +#define Xorriso_timestamP "2011.07.07.113930"