New API function isoburn_igopt_get_data_start()

This commit is contained in:
2009-02-28 17:59:20 +00:00
parent da07c22d31
commit f0734966ff
4 changed files with 43 additions and 3 deletions

View File

@ -353,6 +353,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
IsoWriteOpts *wopts= NULL;
enum burn_disc_status state;
int ret, fifo_chunks, lba, nwa, i, new_img, early_indev_release;
uint32_t data_start= -1;
size_t buffer_size= 0, buffer_free= 0;
char msg[160];
@ -470,6 +471,16 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
if(in_o->iso_data_source!=NULL)
isoburn_data_source_shutdown(in_o->iso_data_source, 0);
}
#ifdef Libisofs_has_iwo_get_data_starT
ret= iso_write_opts_get_data_start(wopts, &data_start, 0);
#else
ret= ISO_ERROR;
#endif
opts->data_start_lba= -1;
if(ret > 0 && data_start <= 0x7FFFFFFF)
opts->data_start_lba= data_start;
/* TODO check return values for failure. propertly clean-up on error */
@ -801,6 +812,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->output_charset= NULL;
o->fifo_size= 4*1024*1024;
o->effective_lba= -1;
o->data_start_lba= -1;
return(1);
}
@ -975,3 +987,9 @@ int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
}
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
{
*lba= o->data_start_lba;
return(1);
}