From f3b55f2864a6629147bf1b1c8236f91609b28ef0 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 5 Feb 2016 09:50:46 +0000 Subject: [PATCH] New API calls isoburn_igopt_set_appended_as_apm, isoburn_igopt_set_part_like_isoisoburn_igopt_set_part_like_isohybrid --- libisoburn/isoburn.c | 38 ++++++++++++++++++++++- libisoburn/isoburn.h | 8 +++++ libisoburn/libisoburn.h | 61 +++++++++++++++++++++++++++++++++++++ xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 107 insertions(+), 2 deletions(-) diff --git a/libisoburn/isoburn.c b/libisoburn/isoburn.c index 9f189024..ae8156e8 100644 --- a/libisoburn/isoburn.c +++ b/libisoburn/isoburn.c @@ -6,7 +6,7 @@ /* Class core of libisoburn. - Copyright 2007 - 2015 Vreixo Formoso Lopes + Copyright 2007 - 2016 Vreixo Formoso Lopes Thomas Schmitt Provided under GPL version 2 or later. @@ -552,6 +552,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o, } } iso_write_opts_set_appended_as_gpt(wopts, opts->appended_as_gpt); + iso_write_opts_set_appended_as_apm(wopts, opts->appended_as_apm); + iso_write_opts_set_part_like_isohybrid(wopts, opts->part_like_isohybrid); iso_write_opts_set_disc_label(wopts, opts->ascii_disc_label); ret= 1; @@ -1170,6 +1172,9 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag) o->appended_part_types[i]= 0; o->appended_part_flags[i]= 0; } + o->appended_as_gpt= 0; + o->appended_as_apm= 0; + o->part_like_isohybrid= 0; memset(o->hfsp_serial_number, 0, 8); o->hfsp_block_size= 0; o->apm_block_size= 0; @@ -1768,6 +1773,37 @@ int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts, } +int isoburn_igopt_set_appended_as_apm(struct isoburn_imgen_opts *opts, int apm) +{ + opts->appended_as_apm= !!apm; + return(1); +} + + +int isoburn_igopt_get_appended_as_apm(struct isoburn_imgen_opts *opts, + int *apm) +{ + *apm= opts->appended_as_apm; + return(1); +} + + +int isoburn_igopt_set_part_like_isohybrid(struct isoburn_imgen_opts *opts, + int alike) +{ + opts->part_like_isohybrid= !!alike; + return(1); +} + + +int isoburn_igopt_get_part_like_isohybrid(struct isoburn_imgen_opts *opts, + int *alike) +{ + *alike= opts->part_like_isohybrid; + 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); diff --git a/libisoburn/isoburn.h b/libisoburn/isoburn.h index 4242a0de..f508d24e 100644 --- a/libisoburn/isoburn.h +++ b/libisoburn/isoburn.h @@ -702,6 +702,14 @@ struct isoburn_imgen_opts { */ int appended_as_gpt; + /* If 1: With appended partitions: mark by APM + */ + int appended_as_apm; + + /* If 1: Apply isohybrid gestures to non-isohybrid situations + */ + int part_like_isohybrid; + /* Eventual name of the non-ISO aspect of the image. E.g. SUN ASCII label. */ char ascii_disc_label[Libisoburn_disc_label_sizE]; diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index ab361749..02e899df 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -1919,6 +1919,67 @@ int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts, int *gpt); +/** Control whether partitions created by iso_write_opts_set_partition_img() + are to be represented in Apple Partition Map. + @since 1.4.4 + @param opts + The option set to be manipulated. + @param apm + 0= do not represent appended partitions in APM + 1= represent in APM, even if not + iso_write_opts_set_part_like_isohybrid() enables it and no + other APM partitions emerge. + Do not use other values for now. + @return + <=0 = error, 1 = success +*/ +int isoburn_igopt_set_appended_as_apm(struct isoburn_imgen_opts *opts, + int apm); + +/** Inquire the current setting made by isoburn_igopt_set_appended_as_apm(). + @since 1.4.4 + @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_apm(struct isoburn_imgen_opts *opts, + int *apm); + + +/** Control whether bits 2 to 8 of el_torito_set_isolinux_options() + shall apply even if not isohybrid MBR patching is enabled (bit1 of + parameter options of isoburn_igopt_set_system_area()). + For details see iso_write_opts_set_part_like_isohybrid() in libisofs.h. + @since 1.4.4 + @param opts + The option set to be manipulated. + @param alike + 0= Apply isohybrid behavior only with ISOLINUX isohybrid. + Do not mention appended partitions in APM unless + isoburn_igopt_set_appended_as_apm() is enabled. + 1= Apply isohybrid behavior even without ISOLINUX isohybrid. + @return + <=0 = error, 1 = success +*/ +int isoburn_igopt_set_part_like_isohybrid(struct isoburn_imgen_opts *opts, + int alike); + +/** Inquire the current setting of isoburn_igopt_set_part_like_isohybrid(). + @since 1.4.4 + @param opts + The option set to be inquired. + @param alike + Returns the current value. + @return + <=0 = error, 1 = success +*/ +int isoburn_igopt_get_part_like_isohybrid(struct isoburn_imgen_opts *opts, + int *alike); + + /** 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: diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 871a70c6..d3bda0fb 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2016.01.20.104342" +#define Xorriso_timestamP "2016.02.05.095140"