New API calls isoburn_igopt_set_hfsp_block_size() and isoburn_igopt_get_hfsp_block_size()
This commit is contained in:
parent
395ff93df2
commit
50e8b66845
@ -472,6 +472,8 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
|
||||
iso_write_opts_set_rockridge(wopts, opts->rockridge);
|
||||
iso_write_opts_set_joliet(wopts, opts->joliet);
|
||||
iso_write_opts_set_hfsplus(wopts, opts->hfsplus);
|
||||
iso_write_opts_set_hfsp_block_size(wopts, opts->hfsp_block_size,
|
||||
opts->apm_block_size);
|
||||
iso_write_opts_set_fat(wopts, opts->fat);
|
||||
iso_write_opts_set_iso1999(wopts, opts->iso1999);
|
||||
iso_write_opts_set_hardlinks(wopts, opts->hardlinks);
|
||||
@ -1095,6 +1097,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
||||
o->appended_part_types[i]= 0;
|
||||
}
|
||||
memset(o->hfsp_serial_number, 0, 8);
|
||||
o->hfsp_block_size= 0;
|
||||
o->apm_block_size= 0;
|
||||
return(1);
|
||||
}
|
||||
|
||||
@ -1660,3 +1664,42 @@ int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts,
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_hfsp_block_size(struct isoburn_imgen_opts *opts,
|
||||
int hfsp_block_size, int apm_block_size)
|
||||
{
|
||||
char msg[80];
|
||||
|
||||
msg[0]= 0;
|
||||
if(hfsp_block_size != -1) {
|
||||
if(hfsp_block_size != 0 && hfsp_block_size != 512 &&
|
||||
hfsp_block_size != 2048) {
|
||||
sprintf(msg, "Not a supported HFS+ size (%d <-> 0, 512, 2048)",
|
||||
hfsp_block_size);
|
||||
isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
}
|
||||
opts->hfsp_block_size = hfsp_block_size;
|
||||
}
|
||||
if(apm_block_size != -1) {
|
||||
if(apm_block_size != 0 && apm_block_size != 512 && apm_block_size != 2048) {
|
||||
sprintf(msg, "Not a supported APM block size (%d <-> 0, 512, 2048)",
|
||||
apm_block_size);
|
||||
isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
}
|
||||
opts->apm_block_size = apm_block_size;
|
||||
}
|
||||
if(msg[0])
|
||||
return(0);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts,
|
||||
int *hfsp_block_size, int *apm_block_size)
|
||||
{
|
||||
*hfsp_block_size= opts->hfsp_block_size;
|
||||
*apm_block_size= opts->apm_block_size;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -683,6 +683,14 @@ struct isoburn_imgen_opts {
|
||||
*/
|
||||
uint8_t hfsp_serial_number[8];
|
||||
|
||||
/* Allocation block size of HFS+ : 0= auto , 512, or 2048
|
||||
*/
|
||||
int hfsp_block_size;
|
||||
|
||||
/* Block size of and in APM : 0= auto , 512, or 2048
|
||||
*/
|
||||
int apm_block_size;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -1797,6 +1797,42 @@ int isoburn_igopt_set_hfsp_serial_number(struct isoburn_imgen_opts *opts,
|
||||
int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts,
|
||||
uint8_t serial_number[8]);
|
||||
|
||||
/** Set the allocation block size for HFS+ production and the block size
|
||||
for layout and address unit of Apple Partition map.
|
||||
@since 1.2.4
|
||||
@param opts
|
||||
The option set to be manipulated.
|
||||
@param hfsp_block_size
|
||||
-1 means that this setting shall be left unchanged
|
||||
0 allows the automatic default setting
|
||||
512 and 2048 enforce a size.
|
||||
@param apm_block_size
|
||||
-1 means that this setting shall be left unchanged
|
||||
0 allows the automatic default setting
|
||||
512 and 2048 enforce a size.
|
||||
Size 512 cannot be combined with GPT production.
|
||||
Size 2048 cannot be mounted -t hfsplus by Linux kernels at least up
|
||||
to 2.6.32.
|
||||
@return
|
||||
<=0 = error, 1 = success
|
||||
*/
|
||||
int isoburn_igopt_set_hfsp_block_size(struct isoburn_imgen_opts *opts,
|
||||
int hfsp_block_size, int apm_block_size);
|
||||
|
||||
/** Inquire the current setting made by isoburn_igopt_set_hfsp_block_size
|
||||
@since 1.2.4
|
||||
@param opts
|
||||
The option set to be inquired.
|
||||
@param hfsp_block_size
|
||||
Will be set to a value as described above. Except -1.
|
||||
@param apm_block_size
|
||||
Will be set to a value as described above. Except -1.
|
||||
@return
|
||||
<=0 = error, 1 = success
|
||||
*/
|
||||
int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts,
|
||||
int *hfsp_block_size, int *apm_block_size);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* End of Options for image generation */
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2012.06.25.125438"
|
||||
#define Xorriso_timestamP "2012.06.27.184552"
|
||||
|
Loading…
Reference in New Issue
Block a user