Adjusted reply of isoburn_disc_get_msc1() to eventual -rom_toc_scan result

This commit is contained in:
Thomas Schmitt 2008-05-08 18:53:31 +00:00
parent 32f3a7fe66
commit e791e25423
4 changed files with 18 additions and 2 deletions

View File

@ -249,6 +249,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
{
int ret, lba, nwa, profile, readonly= 0;
struct burn_multi_caps *caps= NULL;
struct isoburn_toc_entry *t;
char profile_name[80];
profile_name[0]= 0;
@ -309,11 +310,17 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
/* This might also be multi-session media which do not
get shown with a decent TOC.
CD-R TOC (profile 0x08) can be trusted. Others not.
Do a scan search of ISO headers.
*/
/* do a scan search of ISO headers */
ret= isoburn_emulate_toc(d, 1|2);
if(ret<0)
goto ex;
if(ret>0) { /* point msc1 to last session */
if((*o)->toc!=NULL) {
for(t= (*o)->toc; t->next!=NULL; t= t->next);
(*o)->fabricated_msc1= t->start_lba;
}
}
}
}
#ifdef Hardcoded_cd_rW
@ -540,6 +547,10 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0)
return(0);
if(o->fabricated_msc1>=0) {
*start_lba= o->fabricated_msc1;
return(1);
}
if(ret>0) if(o->emulation_mode>0) {
*start_lba= 0;
return(1);

View File

@ -112,6 +112,7 @@ int isoburn_new(struct isoburn **objpt, int flag)
o->drive= NULL;
o->emulation_mode= 0;
o->fabricated_msc1= -1;
o->zero_nwa= Libisoburn_overwriteable_starT;
o->min_start_byte= o->zero_nwa * 2048;
o->nwa= o->zero_nwa;

View File

@ -51,6 +51,10 @@ struct isoburn {
struct isoburn *next;
/* If >= 0, this address is used as reply for isoburn_disc_get_msc1()
*/
int fabricated_msc1;
/* The nwa to be used for a first session on the present kind of overwriteable
media (usually Libisoburn_overwriteable_starT, but might be forced to 0)
*/

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.05.08.141920"
#define Xorriso_timestamP "2008.05.08.185350"