Giving overwriteable media a single-session toc with isoburn_drive_aquire(bit4)

This commit is contained in:
Thomas Schmitt 2009-08-17 16:23:58 +00:00
parent 489a1b6c98
commit 1b8f2cc0ee
2 changed files with 12 additions and 9 deletions

View File

@ -322,16 +322,13 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
(*o)->emulation_mode= -1; (*o)->emulation_mode= -1;
goto ex; goto ex;
} }
if(!(flag & 16)) { /* try to read emulated toc */
/* try to read emulated toc */ ret= isoburn_emulate_toc(d, flag & 16);
ret= isoburn_emulate_toc(d, 0); if(ret<0) {
if(ret<0) { (*o)->emulation_mode= -1;
(*o)->emulation_mode= -1; goto ex;
goto ex;
}
} }
} }
} else { } else {
/* >>> recognize unsuitable media (but allow read-only media) */; /* >>> recognize unsuitable media (but allow read-only media) */;
@ -1113,6 +1110,8 @@ no_memory:;
/* @param flag bit0= allow unemulated media /* @param flag bit0= allow unemulated media
bit1= free scanning without enclosing LBA-0-header 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 @return -1 severe error, 0= no neat header chain, 1= credible chain read
*/ */
int isoburn_emulate_toc(struct burn_drive *d, int flag) 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;} {ret= 0; goto failure;}
lba= Libisoburn_overwriteable_starT; lba= Libisoburn_overwriteable_starT;
with_enclosure= 1; with_enclosure= 1;
if((flag & 16) && o->emulation_mode == 1) {
ret= 1;
goto failure; /* This will represent the media as single session */
}
} }
while(lba<image_size || (flag&2)) { while(lba<image_size || (flag&2)) {
now= time(NULL); now= time(NULL);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.08.16.200906" #define Xorriso_timestamP "2009.08.17.162456"