From 8975ea87b0e50ded2398818409498fef6d21fd60 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 26 Jul 2008 07:51:42 +0000 Subject: [PATCH] Producing on overwriteables a partial TOC up to first damaged superblock --- libisoburn/trunk/libisoburn/burn_wrap.c | 55 ++++++++++++++------ libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/libisoburn/trunk/libisoburn/burn_wrap.c b/libisoburn/trunk/libisoburn/burn_wrap.c index 2000c63f..af4a11eb 100644 --- a/libisoburn/trunk/libisoburn/burn_wrap.c +++ b/libisoburn/trunk/libisoburn/burn_wrap.c @@ -1029,6 +1029,30 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba, } +int isoburn_make_toc_entry(struct isoburn *o, int *session_count, int lba, + int track_blocks, int flag) +{ + int ret; + struct isoburn_toc_entry *item; + + ret= isoburn_toc_entry_new(&item, o->toc, 0); + if(ret<=0) { + isoburn_msgs_submit(o, 0x00060000, + "Not enough memory for emulated TOC entry object", + 0, "FATAL", 0); + return(-1); + } + if(o->toc==NULL) + o->toc= item; + (*session_count)++; + item->session= *session_count; + item->track_no= *session_count; + item->start_lba= lba; + item->track_blocks= track_blocks; + return(1); +} + + /* @param flag bit0= allow unemulated media bit1= free scanning without enclosing LBA-0-header @return -1 severe error, 0= no neat header chain, 1= credible chain read @@ -1037,8 +1061,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag) { int ret, image_size= 0, lba, track_blocks, session_count= 0, read_flag= 0; int scan_start= 0, scan_count= 0, probe_minus_16= 0, growisofs_nwa; + int with_enclosure= 0; struct isoburn *o; - struct isoburn_toc_entry *item; char msg[160], size_text[80], *sev; time_t start_time, last_pacifier, now; @@ -1058,6 +1082,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag) if(ret<=0) {ret= 0; goto failure;} lba= Libisoburn_overwriteable_starT; + with_enclosure= 1; } while(lbatoc, 0); - if(ret<=0) { - isoburn_msgs_submit(o, 0x00060000, - "Not enough memory for emulated TOC entry object", - 0, "FATAL", 0); - ret= -1; goto failure; - } - if(o->toc==NULL) - o->toc= item; - session_count++; - scan_count+= 32; - item->session= session_count; - item->track_no= session_count; - item->start_lba= lba; - item->track_blocks= track_blocks; + + ret= isoburn_make_toc_entry(o, &session_count, lba, track_blocks, 0); + if(ret<=0) + goto failure; lba+= track_blocks; + scan_count+= 32; /* growisofs aligns to 16 rather than 32 */ growisofs_nwa= lba; diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index a13fa540..370cf28e 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.07.21.161826" +#define Xorriso_timestamP "2008.07.26.075027"