New API calls isoburn_igopt_set_appended_as_gpt(), isoburn_igopt_get_appended_as_gpt()

This commit is contained in:
Thomas Schmitt 2015-02-06 11:48:23 +00:00
parent 05de6d6f60
commit e5f9d21ce8
5 changed files with 57 additions and 4 deletions

View File

@ -6,7 +6,7 @@
/*
Class core of libisoburn.
Copyright 2007 - 2012 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2015 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -548,6 +548,7 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
{ret= -1; goto ex;}
}
}
iso_write_opts_set_appended_as_gpt(wopts, opts->appended_as_gpt);
iso_write_opts_set_disc_label(wopts, opts->ascii_disc_label);
ret= 1;
@ -1674,6 +1675,21 @@ int isoburn_igopt_get_partition_img(struct isoburn_imgen_opts *opts,
}
int isoburn_igopt_set_appended_as_gpt(struct isoburn_imgen_opts *opts, int gpt)
{
opts->appended_as_gpt= !!gpt;
return(1);
}
int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts,
int *gpt)
{
*gpt= opts->appended_as_gpt;
return(1);
}
int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label)
{
strncpy(opts->ascii_disc_label, label, Libisoburn_disc_label_sizE - 1);

View File

@ -2,7 +2,7 @@
/*
Class struct of libisoburn.
Copyright 2007 - 2012 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2015 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -684,6 +684,10 @@ struct isoburn_imgen_opts {
char *appended_partitions[Libisoburn_max_appended_partitionS];
uint8_t appended_part_types[Libisoburn_max_appended_partitionS];
/* If 1: With appended partitions: create protective MBR and mark by GPT
*/
int appended_as_gpt;
/* Eventual name of the non-ISO aspect of the image. E.g. SUN ASCII label.
*/
char ascii_disc_label[Libisoburn_disc_label_sizE];

View File

@ -2,7 +2,7 @@
/*
Lower level API definition of libisoburn.
Copyright 2007-2014 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007-2015 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -1791,6 +1791,37 @@ int isoburn_igopt_get_partition_img(struct isoburn_imgen_opts *opts,
char *image_paths[]);
/** Control whether partitions created by iso_write_opts_set_partition_img()
are to be represented in MBR or as GPT partitions.
@since 1.4.0
@param opts
The option set to be manipulated.
@param gpt
0= represent as MBR partition; as GPT only if other GPT partitions
are present
1= represent as GPT partition and cause protective MBR with a single
partition which covers the whole output data.
This may fail if other settings demand MBR partitions.
Do not use other values for now.
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_set_appended_as_gpt(struct isoburn_imgen_opts *opts,
int gpt);
/** Inquire the current setting made by isoburn_igopt_set_appended_as_gpt().
@since 1.4.0
@param opts
The option set to be inquired.
@param gpt
Returns the current value.
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts,
int *gpt);
/** Set a name for the system area. This setting is ignored unless system area
type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area().
In this case it will replace the default text at the start of the image:

View File

@ -28,6 +28,7 @@ isoburn_get_mount_params;
isoburn_igopt_attach_jte;
isoburn_igopt_destroy;
isoburn_igopt_detach_jte;
isoburn_igopt_get_appended_as_gpt;
isoburn_igopt_get_data_start;
isoburn_igopt_get_disc_label;
isoburn_igopt_get_effective_lba;
@ -53,6 +54,7 @@ isoburn_igopt_get_tail_blocks;
isoburn_igopt_get_untranslated_name_len;
isoburn_igopt_get_write_type;
isoburn_igopt_new;
isoburn_igopt_set_appended_as_gpt;
isoburn_igopt_set_disc_label;
isoburn_igopt_set_efi_bootp;
isoburn_igopt_set_extensions;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.02.04.113526"
#define Xorriso_timestamP "2015.02.06.114605"