diff --git a/libisoburn/isoburn.c b/libisoburn/isoburn.c index c7ac8a3f..308b3625 100644 --- a/libisoburn/isoburn.c +++ b/libisoburn/isoburn.c @@ -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); +} + diff --git a/libisoburn/isoburn.h b/libisoburn/isoburn.h index 0bf5e7aa..b0b70351 100644 --- a/libisoburn/isoburn.h +++ b/libisoburn/isoburn.h @@ -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]; + }; diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index ebc6fbab..d9bad47d 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -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 */ diff --git a/libisoburn/libisoburn.ver b/libisoburn/libisoburn.ver index 204934e3..9d6c6374 100644 --- a/libisoburn/libisoburn.ver +++ b/libisoburn/libisoburn.ver @@ -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; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 1cc54504..bbf84b76 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2012.05.26.212559" +#define Xorriso_timestamP "2012.05.27.165658"