New flag bit 9 with isoburn_drive_aquire()

This commit is contained in:
Thomas Schmitt 2012-08-14 10:27:23 +00:00
parent 1c2306ab10
commit 17860622a4
3 changed files with 21 additions and 6 deletions

View File

@ -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;}

View File

@ -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.

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.07.25.184207"
#define Xorriso_timestamP "2012.08.14.102632"