New API call iso_write_opts_set_hfsp_serial_number().
This commit is contained in:
parent
1ed3ba7933
commit
e57e45e40b
@ -1815,6 +1815,8 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
|||||||
goto target_cleanup;
|
goto target_cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memcpy(target->hfsp_serial_number, opts->hfsp_serial_number, 8);
|
||||||
|
|
||||||
target->md5_file_checksums = opts->md5_file_checksums;
|
target->md5_file_checksums = opts->md5_file_checksums;
|
||||||
target->md5_session_checksum = opts->md5_session_checksum;
|
target->md5_session_checksum = opts->md5_session_checksum;
|
||||||
strcpy(target->scdbackup_tag_parm, opts->scdbackup_tag_parm);
|
strcpy(target->scdbackup_tag_parm, opts->scdbackup_tag_parm);
|
||||||
@ -1875,9 +1877,9 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
|||||||
}
|
}
|
||||||
strcpy(target->ascii_disc_label, opts->ascii_disc_label);
|
strcpy(target->ascii_disc_label, opts->ascii_disc_label);
|
||||||
for (i = 0; i < ISO_HFSPLUS_BLESS_MAX; i++) {
|
for (i = 0; i < ISO_HFSPLUS_BLESS_MAX; i++) {
|
||||||
target->hfsplus_blessed[i] = src->hfsplus_blessed[i];
|
target->hfsplus_blessed[i] = src->hfsplus_blessed[i];
|
||||||
if (target->hfsplus_blessed[i] != NULL)
|
if (target->hfsplus_blessed[i] != NULL)
|
||||||
iso_node_ref(target->hfsplus_blessed[i]);
|
iso_node_ref(target->hfsplus_blessed[i]);
|
||||||
}
|
}
|
||||||
target->apm_block_size = 512;
|
target->apm_block_size = 512;
|
||||||
for (i = 0; i < ISO_APM_ENTRIES_MAX; i++)
|
for (i = 0; i < ISO_APM_ENTRIES_MAX; i++)
|
||||||
@ -2617,6 +2619,8 @@ int iso_write_opts_new(IsoWriteOpts **opts, int profile)
|
|||||||
wopts->allow_dir_id_ext = 0;
|
wopts->allow_dir_id_ext = 0;
|
||||||
wopts->old_empty = 0;
|
wopts->old_empty = 0;
|
||||||
wopts->untranslated_name_len = 0;
|
wopts->untranslated_name_len = 0;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
wopts->hfsp_serial_number[i] = 0;
|
||||||
|
|
||||||
*opts = wopts;
|
*opts = wopts;
|
||||||
return ISO_SUCCESS;
|
return ISO_SUCCESS;
|
||||||
@ -3236,3 +3240,10 @@ int iso_write_opts_set_disc_label(IsoWriteOpts *opts, char *label)
|
|||||||
return ISO_SUCCESS;
|
return ISO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int iso_write_opts_set_hfsp_serial_number(IsoWriteOpts *opts,
|
||||||
|
uint8_t serial_number[8])
|
||||||
|
{
|
||||||
|
memcpy(opts->hfsp_serial_number, serial_number, 8);
|
||||||
|
return ISO_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -449,6 +449,11 @@ struct iso_write_opts {
|
|||||||
*/
|
*/
|
||||||
char ascii_disc_label[ISO_DISC_LABEL_SIZE];
|
char ascii_disc_label[ISO_DISC_LABEL_SIZE];
|
||||||
|
|
||||||
|
/* HFS+ image serial number.
|
||||||
|
* 00...00 means that it shall be generated by libisofs.
|
||||||
|
*/
|
||||||
|
uint8_t hfsp_serial_number[8];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct ecma119_image Ecma119Image;
|
typedef struct ecma119_image Ecma119Image;
|
||||||
@ -553,6 +558,11 @@ struct ecma119_image
|
|||||||
char *input_charset;
|
char *input_charset;
|
||||||
char *output_charset;
|
char *output_charset;
|
||||||
|
|
||||||
|
/* See iso_write_opts and iso_write_opts_set_hfsp_serial_number().
|
||||||
|
* 00...00 means that it shall be generated by libisofs.
|
||||||
|
*/
|
||||||
|
uint8_t hfsp_serial_number[8];
|
||||||
|
|
||||||
unsigned int appendable : 1;
|
unsigned int appendable : 1;
|
||||||
uint32_t ms_block; /**< start block for a ms image */
|
uint32_t ms_block; /**< start block for a ms image */
|
||||||
time_t now; /**< Time at which writing began. */
|
time_t now; /**< Time at which writing began. */
|
||||||
|
@ -1410,6 +1410,23 @@ int iso_write_opts_set_joliet(IsoWriteOpts *opts, int enable);
|
|||||||
*/
|
*/
|
||||||
int iso_write_opts_set_hfsplus(IsoWriteOpts *opts, int enable);
|
int iso_write_opts_set_hfsplus(IsoWriteOpts *opts, int enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Supply a serial number for the HFS+ extension of the emerging image.
|
||||||
|
*
|
||||||
|
* @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
|
||||||
|
* 1 success, < 0 error
|
||||||
|
*
|
||||||
|
* @since 1.2.4
|
||||||
|
*/
|
||||||
|
int iso_write_opts_set_hfsp_serial_number(IsoWriteOpts *opts,
|
||||||
|
uint8_t serial_number[8]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to use newer ISO-9660:1999 version.
|
* Whether to use newer ISO-9660:1999 version.
|
||||||
*
|
*
|
||||||
|
@ -286,6 +286,7 @@ iso_write_opts_set_dir_rec_mtime;
|
|||||||
iso_write_opts_set_disc_label;
|
iso_write_opts_set_disc_label;
|
||||||
iso_write_opts_set_fifo_size;
|
iso_write_opts_set_fifo_size;
|
||||||
iso_write_opts_set_hardlinks;
|
iso_write_opts_set_hardlinks;
|
||||||
|
iso_write_opts_set_hfsp_serial_number;
|
||||||
iso_write_opts_set_hfsplus;
|
iso_write_opts_set_hfsplus;
|
||||||
iso_write_opts_set_iso1999;
|
iso_write_opts_set_iso1999;
|
||||||
iso_write_opts_set_iso_level;
|
iso_write_opts_set_iso_level;
|
||||||
|
Loading…
Reference in New Issue
Block a user