From ca519124affe6ef3a6ab8c04c8e2dfd794c5581f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 17 Aug 2009 16:23:58 +0000 Subject: [PATCH] Giving overwriteable media a single-session toc with isoburn_drive_aquire(bit4) --- libisoburn/trunk/libisoburn/burn_wrap.c | 19 +++++++++++-------- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/libisoburn/trunk/libisoburn/burn_wrap.c b/libisoburn/trunk/libisoburn/burn_wrap.c index b6a3636b..275f9104 100644 --- a/libisoburn/trunk/libisoburn/burn_wrap.c +++ b/libisoburn/trunk/libisoburn/burn_wrap.c @@ -322,16 +322,13 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, (*o)->emulation_mode= -1; goto ex; } - if(!(flag & 16)) { - /* try to read emulated toc */ - ret= isoburn_emulate_toc(d, 0); - if(ret<0) { - (*o)->emulation_mode= -1; - goto ex; - } + /* try to read emulated toc */ + ret= isoburn_emulate_toc(d, flag & 16); + if(ret<0) { + (*o)->emulation_mode= -1; + goto ex; } } - } else { /* >>> recognize unsuitable media (but allow read-only media) */; @@ -1113,6 +1110,8 @@ no_memory:; /* @param flag bit0= allow unemulated media bit1= free scanning without enclosing LBA-0-header + bit4= represent emulated media as one single session + (not with bit1) @return -1 severe error, 0= no neat header chain, 1= credible chain read */ int isoburn_emulate_toc(struct burn_drive *d, int flag) @@ -1141,6 +1140,10 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag) {ret= 0; goto failure;} lba= Libisoburn_overwriteable_starT; with_enclosure= 1; + if((flag & 16) && o->emulation_mode == 1) { + ret= 1; + goto failure; /* This will represent the media as single session */ + } } while(lba