Commit 0d07bd1d authored by Thomas Schmitt's avatar Thomas Schmitt

New API calls isoburn_igopt_set_iso_mbr_part_type(), isoburn_igopt_get_iso_mbr_part_type()

parent caedaa83
......@@ -6,7 +6,7 @@
/*
Class core of libisoburn.
Copyright 2007 - 2016 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2017 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -558,6 +558,7 @@ 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_iso_mbr_part_type(wopts, opts->iso_mbr_part_type);
iso_write_opts_set_disc_label(wopts, opts->ascii_disc_label);
ret= 1;
......@@ -1179,6 +1180,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->appended_as_gpt= 0;
o->appended_as_apm= 0;
o->part_like_isohybrid= 0;
o->iso_mbr_part_type= -1;
memset(o->gpt_guid, 0, 16);
o->gpt_guid_mode= 0;
memset(o->hfsp_serial_number, 0, 8);
......@@ -1810,6 +1812,24 @@ int isoburn_igopt_get_part_like_isohybrid(struct isoburn_imgen_opts *opts,
}
int isoburn_igopt_set_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
int part_type)
{
if(part_type < -1 || part_type > 255)
part_type = -1;
opts->iso_mbr_part_type = part_type;
return(1);
}
int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
int *part_type)
{
*part_type= opts->iso_mbr_part_type;
return(1);
}
int isoburn_igopt_set_gpt_guid(struct isoburn_imgen_opts *opts,
uint8_t guid[16], int mode)
{
......
......@@ -2,7 +2,7 @@
/*
Class struct of libisoburn.
Copyright 2007 - 2016 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2017 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
......@@ -710,6 +710,10 @@ struct isoburn_imgen_opts {
*/
int part_like_isohybrid;
/* isoburn_igopt_set_iso_mbr_part_type()
*/
int iso_mbr_part_type;
/* See libisoburn.h isoburn_igopt_set_gpt_guid()
*/
uint8_t gpt_guid[16];
......
......@@ -5,7 +5,7 @@
/*
Lower level API definition of libisoburn.
Copyright 2007-2016 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007-2017 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
......@@ -1987,6 +1987,34 @@ int isoburn_igopt_set_part_like_isohybrid(struct isoburn_imgen_opts *opts,
int isoburn_igopt_get_part_like_isohybrid(struct isoburn_imgen_opts *opts,
int *alike);
/** Set the partition type of the MBR partition which represents the ISO
filesystem or at least protects it.
This is without effect if no such partition emerges by other settings or
if the partition type is prescribed mandatorily like 0xee for
GPT protective MBR or 0x96 for CHRP.
@since 1.4.8
@param opts
The option set to be manipulated.
@param part_type
0x00 to 0xff as desired partition type.
Any other value (e.g. -1) enables the default types of the various
occasions.
*/
int isoburn_igopt_set_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
int part_type);
/** Inquire the current setting of isoburn_igopt_set_part_like_isohybrid().
@since 1.4.8
@param opts
The option set to be inquired.
@param part_type
Returns the current value: -1, 0x00 to 0xff.
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
int *part_type);
/** Control whether the emerging GPT gets a pseudo-randomly generated disk GUID
or whether it gets a user supplied GUID.
The partition GUIDs will be generated in a reproducible way by exoring a
......
......@@ -39,6 +39,7 @@ isoburn_igopt_get_fifo_size;
isoburn_igopt_get_gpt_guid;
isoburn_igopt_get_hfsp_block_size;
isoburn_igopt_get_hfsp_serial_number;
isoburn_igopt_get_iso_mbr_part_type;
isoburn_igopt_get_level;
isoburn_igopt_get_out_charset;
isoburn_igopt_get_over_mode;
......@@ -67,6 +68,7 @@ isoburn_igopt_set_fifo_size;
isoburn_igopt_set_gpt_guid;
isoburn_igopt_set_hfsp_block_size;
isoburn_igopt_set_hfsp_serial_number;
isoburn_igopt_set_iso_mbr_part_type;
isoburn_igopt_set_level;
isoburn_igopt_set_out_charset;
isoburn_igopt_set_over_mode;
......
#define Xorriso_timestamP "2017.02.13.145207"
#define Xorriso_timestamP "2017.02.27.091402"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment