New API call isoburn_igopt_set_hfsp_serial_number()

This commit is contained in:
Thomas Schmitt 2012-05-27 16:56:14 +00:00
parent 6fdf7a5fae
commit 4ea1032820
5 changed files with 54 additions and 1 deletions

View File

@ -531,6 +531,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
opts->vol_expiration_time, opts->vol_effective_time,
opts->vol_uuid);
iso_write_opts_attach_jte(wopts, opts->libjte_handle);
iso_write_opts_set_hfsp_serial_number(wopts, opts->hfsp_serial_number);
ret= isoburn_adjust_target_iso_head(out_o, opts->partition_offset, 0);
if(ret <= 0)
@ -1074,6 +1075,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->appended_partitions[i]= NULL;
o->appended_part_types[i]= 0;
}
memset(o->hfsp_serial_number, 0, 8);
return(1);
}
@ -1567,3 +1569,19 @@ int isoburn_igopt_get_disc_label(struct isoburn_imgen_opts *opts, char **label)
return(1);
}
int isoburn_igopt_set_hfsp_serial_number(struct isoburn_imgen_opts *opts,
uint8_t serial_number[8])
{
memcpy(opts->hfsp_serial_number, serial_number, 8);
return(1);
}
int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts,
uint8_t serial_number[8])
{
memcpy(serial_number, opts->hfsp_serial_number, 8);
return(1);
}

View File

@ -672,6 +672,12 @@ struct isoburn_imgen_opts {
/* Eventual name of the non-ISO aspect of the image. E.g. SUN ASCII label.
*/
char ascii_disc_label[Libisoburn_disc_label_sizE];
/* HFS+ image serial number.
* 00...00 means that it shall be generated by libisofs.
*/
uint8_t hfsp_serial_number[8];
};

View File

@ -1712,6 +1712,33 @@ int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label);
int isoburn_igopt_get_disc_label(struct isoburn_imgen_opts *opts,
char **label);
/** Set a serial number for the HFS+ extension of the emerging ISO image.
@since 1.2.4
@param opts
The option set to be manipulated.
@param serial_number
8 bytes which should be unique to the image.
If all bytes are 0, then the serial number will be generated as
random number by libisofs. This is the default setting.
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_set_hfsp_serial_number(struct isoburn_imgen_opts *opts,
uint8_t serial_number[8]);
/** Inquire the current setting made by isoburn_igopt_set_disc_label()
@since 1.2.4
@param opts
The option set to be inquired.
@param serial_number
Will get filled with the current setting.
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts,
uint8_t serial_number[8]);
/* ----------------------------------------------------------------------- */
/* End of Options for image generation */

View File

@ -31,6 +31,7 @@ isoburn_igopt_get_disc_label;
isoburn_igopt_get_effective_lba;
isoburn_igopt_get_extensions;
isoburn_igopt_get_fifo_size;
isoburn_igopt_get_hfsp_serial_number;
isoburn_igopt_get_level;
isoburn_igopt_get_out_charset;
isoburn_igopt_get_over_mode;
@ -48,6 +49,7 @@ isoburn_igopt_new;
isoburn_igopt_set_disc_label;
isoburn_igopt_set_extensions;
isoburn_igopt_set_fifo_size;
isoburn_igopt_set_hfsp_serial_number;
isoburn_igopt_set_level;
isoburn_igopt_set_out_charset;
isoburn_igopt_set_over_mode;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.05.26.212559"
#define Xorriso_timestamP "2012.05.27.165658"