New API calls isoburn_igopt_set_rr_reloc(), isoburn_igopt_get_rr_reloc()

This commit is contained in:
2012-03-10 14:51:04 +00:00
parent 1cd812e25a
commit 5d00144aa6
5 changed files with 95 additions and 2 deletions

View File

@@ -481,6 +481,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
iso_write_opts_set_allow_dir_id_ext(wopts, opts->allow_dir_id_ext);
iso_write_opts_set_omit_version_numbers(wopts, opts->omit_version_numbers);
iso_write_opts_set_allow_deep_paths(wopts, opts->allow_deep_paths);
iso_write_opts_set_rr_reloc(wopts, opts->rr_reloc_dir, opts->rr_reloc_flags);
iso_write_opts_set_allow_longer_paths(wopts, opts->allow_longer_paths);
iso_write_opts_set_max_37_char_filenames(wopts, opts->max_37_char_filenames);
iso_write_opts_set_no_force_dots(wopts, opts->no_force_dots);
@@ -974,6 +975,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->allow_dir_id_ext = 0;
o->omit_version_numbers= 0;
o->allow_deep_paths= 1;
o->rr_reloc_dir= NULL;
o->rr_reloc_flags= 0;
o->allow_longer_paths= 0;
o->max_37_char_filenames= 0;
o->no_force_dots= 0;
@@ -1023,6 +1026,8 @@ int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag)
if(*o==NULL)
return(0);
if((*o)->rr_reloc_dir != NULL)
free((*o)->rr_reloc_dir);
for(i= 0; i < Libisoburn_max_appended_partitionS; i++)
if((*o)->appended_partitions[i] != NULL)
free((*o)->appended_partitions[i]);
@@ -1114,6 +1119,38 @@ int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax)
return(1);
}
int isoburn_igopt_set_rr_reloc(struct isoburn_imgen_opts *o, char *name,
int flags)
{
if(o->rr_reloc_dir != name) {
if(o->rr_reloc_dir != NULL)
free(o->rr_reloc_dir);
o->rr_reloc_dir= NULL;
if(name != NULL) {
o->rr_reloc_dir= strdup(name);
if(o->rr_reloc_dir == NULL) {
isoburn_msgs_submit(NULL, 0x00060000,
"Cannot allocate memory for image generation options",
0, "FATAL", 0);
return(-1);
}
}
}
o->rr_reloc_flags = flags & 1;
return 1;
}
int isoburn_igopt_get_rr_reloc(struct isoburn_imgen_opts *o, char **name,
int *flags)
{
*name= o->rr_reloc_dir;
*flags= o->rr_reloc_flags;
return(1);
}
int isoburn_igopt_set_untranslated_name_len(struct isoburn_imgen_opts *o,
int len)
{