From 17860622a46ea194a68f0a0a254dc05a4f84331b Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 14 Aug 2012 10:27:23 +0000 Subject: [PATCH] New flag bit 9 with isoburn_drive_aquire() --- libisoburn/burn_wrap.c | 21 ++++++++++++++++----- libisoburn/libisoburn.h | 4 ++++ xorriso/xorriso_timestamp.h | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/libisoburn/burn_wrap.c b/libisoburn/burn_wrap.c index fbe4815c..223f4a1f 100644 --- a/libisoburn/burn_wrap.c +++ b/libisoburn/burn_wrap.c @@ -340,6 +340,9 @@ int isoburn_is_intermediate_dvd_rw(struct burn_drive *d, int flag) bit5= ignore ACL from external filesystems bit6= ignore POSIX Extended Attributes from external filesystems bit7= pretend -ROM and scan for table of content + bit9= when scanning for ISO 9660 sessions on overwritable + media: Do not demand a valid superblock at LBA 0 + and scan until end of medium. */ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, int flag) @@ -410,7 +413,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, } emulation_started= 1; /* try to read emulated toc */ - ret= isoburn_emulate_toc(d, flag & 16); + ret= isoburn_emulate_toc(d, (flag & 16) | ((!!(flag & 512)) << 1)); if(ret<0) { (*o)->emulation_mode= -1; goto ex; @@ -462,7 +465,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, goto ex; } emulation_started= 1; - ret= isoburn_emulate_toc(d, 1); + ret= isoburn_emulate_toc(d, 1 | ((!!(flag & 512)) << 1)); if(ret<0) goto ex; else if(ret > 0) @@ -481,7 +484,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, goto ex; } } - ret= isoburn_emulate_toc(d, 1|2); + ret= isoburn_emulate_toc(d, 1 | 2); if(ret<0) goto ex; if(ret>0) { /* point msc1 to last session */ @@ -526,6 +529,9 @@ ex: bit6= ignore POSIX Extended Attributes from external filesystems bit7= pretend -ROM profile and scan for table of content bit8= re-assess (*drive_infos)[0] rather than aquiring adr + bit9= when scanning for ISO 9660 sessions on overwritable + media: Do not demand a valid superblock at LBA 0 + and scan until end of medium. */ int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], char *adr, int flag) @@ -552,7 +558,7 @@ int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], goto ex; drive_grabbed= 1; ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive, - (flag & (8 | 16 | 32 | 64 | 128)) | !!(flag&2)); + (flag & (8 | 16 | 32 | 64 | 128 | 512)) | !!(flag&2)); if(ret<=0) goto ex; @@ -1389,7 +1395,12 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag) start_time= last_pacifier= time(NULL); lba= 0; - if(!(flag&2)) { + if(flag & 2) { + /* If there is a PVD at LBA 32 then this is an image with emulated TOC */ + ret= isoburn_read_iso_head(d, 32, &image_size, NULL, 0); + if(ret > 0) + lba= 32; + } else { ret= isoburn_read_iso_head(d, lba, &image_size, NULL, 0); if(ret<=0) {ret= 0; goto failure;} diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index dea2aafa..699d5c9c 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -436,6 +436,10 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], bit8= re-assess already acquired (*drive_infos)[0] rather than aquiring adr @since 1.1.8 + bit9= when scanning for ISO 9660 sessions by bit3: + Do not demand a valid superblock at LBA 0, ignore it in + favor of one at LBA 32, and scan until end of medium. + @since 1.2.6 @return 1 = success , 0 = drive not found , <0 = other error Please excuse the typo "aquire" in the function name. diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 02b62f50..37c2eb87 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2012.07.25.184207" +#define Xorriso_timestamP "2012.08.14.102632"