|
|
|
@ -925,10 +925,11 @@ int isoburn_report_iso_error(int iso_error_code, char msg_text[], int os_errno,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* @param flag bit0-7: info return mode
|
|
|
|
|
/* API
|
|
|
|
|
@param flag bit0-7: info return mode
|
|
|
|
|
0= do not return anything in info (do not even touch it)
|
|
|
|
|
1= return volume id
|
|
|
|
|
@return 1 seems to be a valid ISO image , 0 seems not to be ISO, <0 error
|
|
|
|
|
@return 1 seems to be a valid ISO image , 0 format not recognized, <0 error
|
|
|
|
|
*/
|
|
|
|
|
int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
|
|
|
|
int *image_blocks, char *info, int flag)
|
|
|
|
@ -937,6 +938,7 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
|
|
|
|
int ret, i, info_mode;
|
|
|
|
|
off_t data_count;
|
|
|
|
|
|
|
|
|
|
*image_blocks= 0;
|
|
|
|
|
ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer,
|
|
|
|
|
(off_t) 64*1024, &data_count, 2); /* no error messages */
|
|
|
|
|
if(ret<=0)
|
|
|
|
@ -945,7 +947,7 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
|
|
|
|
data= buffer+32*1024;
|
|
|
|
|
/* is this an ISO image ? */
|
|
|
|
|
if(data[0]!=1)
|
|
|
|
|
return(0);
|
|
|
|
|
return(0);
|
|
|
|
|
if(strncmp((char *) (data+1),"CD001",5)!=0)
|
|
|
|
|
return(0);
|
|
|
|
|
|
|
|
|
@ -1174,16 +1176,16 @@ failure:;
|
|
|
|
|
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
|
|
|
|
|
{
|
|
|
|
|
struct isoburn_toc_entry *t;
|
|
|
|
|
int count= 0;
|
|
|
|
|
int ret= 0;
|
|
|
|
|
|
|
|
|
|
if(disc==NULL)
|
|
|
|
|
return(0);
|
|
|
|
|
if(disc->toc!=NULL) {
|
|
|
|
|
for(t= disc->toc; t!=NULL; t= t->next)
|
|
|
|
|
count+= t->track_blocks;
|
|
|
|
|
ret= t->start_lba + t->track_blocks;
|
|
|
|
|
} else if(disc->disc!=NULL)
|
|
|
|
|
count= burn_disc_get_sectors(disc->disc);
|
|
|
|
|
return(count);
|
|
|
|
|
ret= burn_disc_get_sectors(disc->disc);
|
|
|
|
|
return(ret);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|