New API call isoburn_igopt_set_system_area()
This commit is contained in:
@@ -449,6 +449,14 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
|
||||
iso_write_opts_set_default_gid(wopts, opts->gid);
|
||||
iso_write_opts_set_output_charset(wopts, opts->output_charset);
|
||||
iso_write_opts_set_fifo_size(wopts, fifo_chunks);
|
||||
ret = iso_write_opts_set_system_area(wopts, opts->system_area_data,
|
||||
opts->system_area_options, 0);
|
||||
if (ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot set content of System Area",
|
||||
0, "FAILURE", 0);
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
|
||||
|
||||
ret = isoburn_disc_track_lba_nwa(out_d, NULL, 0, &lba, &nwa);
|
||||
opts->effective_lba= nwa;
|
||||
@@ -850,6 +858,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
||||
o->fifo_size= 4*1024*1024;
|
||||
o->effective_lba= -1;
|
||||
o->data_start_lba= -1;
|
||||
o->system_area_data= NULL;
|
||||
o->system_area_options= 0;
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -1061,3 +1071,35 @@ int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *opts,
|
||||
char data[32768], int options)
|
||||
{
|
||||
if (data == NULL) { /* Disable */
|
||||
if (opts->system_area_data != NULL)
|
||||
free(opts->system_area_data);
|
||||
opts->system_area_data = NULL;
|
||||
} else {
|
||||
if (opts->system_area_data == NULL) {
|
||||
opts->system_area_data = calloc(32768, 1);
|
||||
if (opts->system_area_data == NULL)
|
||||
return(-1);
|
||||
}
|
||||
memcpy(opts->system_area_data, data, 32768);
|
||||
}
|
||||
opts->system_area_options = options & 1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_system_area(struct isoburn_imgen_opts *opts,
|
||||
char data[32768], int *options)
|
||||
{
|
||||
*options= opts->system_area_options;
|
||||
if(opts->system_area_data == NULL)
|
||||
return(0);
|
||||
memcpy(data, opts->system_area_data, 32768);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user