|
|
|
@ -521,7 +521,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|
|
|
|
opts->partition_heads_per_cyl);
|
|
|
|
|
iso_write_opts_set_tail_blocks(wopts, opts->tail_blocks);
|
|
|
|
|
if(opts->prep_partition != NULL) {
|
|
|
|
|
ret = iso_write_opts_set_prep_img(wopts, opts->prep_partition, 0);
|
|
|
|
|
ret = iso_write_opts_set_prep_img(wopts, opts->prep_partition,
|
|
|
|
|
opts->prep_part_flag & 1);
|
|
|
|
|
if(ret < 0) {
|
|
|
|
|
isoburn_report_iso_error(ret, "Cannot set path for PreP partition",
|
|
|
|
|
0, "FAILURE", 0);
|
|
|
|
@ -529,7 +530,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(opts->efi_boot_partition != NULL) {
|
|
|
|
|
ret = iso_write_opts_set_efi_bootp(wopts, opts->efi_boot_partition, 0);
|
|
|
|
|
ret = iso_write_opts_set_efi_bootp(wopts, opts->efi_boot_partition,
|
|
|
|
|
opts->efi_boot_part_flag & 1);
|
|
|
|
|
if(ret < 0) {
|
|
|
|
|
isoburn_report_iso_error(ret, "Cannot set path for EFI system partition",
|
|
|
|
|
0, "FAILURE", 0);
|
|
|
|
@ -541,7 +543,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|
|
|
|
continue;
|
|
|
|
|
ret= iso_write_opts_set_partition_img(wopts, i + 1,
|
|
|
|
|
opts->appended_part_types[i],
|
|
|
|
|
opts->appended_partitions[i], 0);
|
|
|
|
|
opts->appended_partitions[i],
|
|
|
|
|
opts->appended_part_flags[i]);
|
|
|
|
|
if(ret < 0) {
|
|
|
|
|
isoburn_report_iso_error(ret, "Cannot set path for appended partition",
|
|
|
|
|
0, "FAILURE", 0);
|
|
|
|
@ -1128,10 +1131,13 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
|
|
|
|
o->libjte_handle= NULL;
|
|
|
|
|
o->tail_blocks= 0;
|
|
|
|
|
o->prep_partition= NULL;
|
|
|
|
|
o->prep_part_flag= 0;
|
|
|
|
|
o->efi_boot_partition= NULL;
|
|
|
|
|
o->efi_boot_part_flag= 0;
|
|
|
|
|
for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
|
|
|
|
|
o->appended_partitions[i]= NULL;
|
|
|
|
|
o->appended_part_types[i]= 0;
|
|
|
|
|
o->appended_part_flags[i]= 0;
|
|
|
|
|
}
|
|
|
|
|
memset(o->hfsp_serial_number, 0, 8);
|
|
|
|
|
o->hfsp_block_size= 0;
|
|
|
|
@ -1586,6 +1592,7 @@ int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *o,
|
|
|
|
|
if(o->prep_partition != NULL)
|
|
|
|
|
free(o->prep_partition);
|
|
|
|
|
o->prep_partition= NULL;
|
|
|
|
|
o->prep_part_flag= 0;
|
|
|
|
|
if(path != NULL) {
|
|
|
|
|
o->prep_partition= strdup(path);
|
|
|
|
|
if(o->prep_partition == NULL) {
|
|
|
|
@ -1593,6 +1600,7 @@ int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *o,
|
|
|
|
|
return(-1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
o->prep_part_flag= flag & 1;
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1601,6 +1609,8 @@ int isoburn_igopt_get_prep_partition(struct isoburn_imgen_opts *opts,
|
|
|
|
|
char **path, int flag)
|
|
|
|
|
{
|
|
|
|
|
*path= opts->prep_partition;
|
|
|
|
|
if(flag & 1)
|
|
|
|
|
return(1 + (opts->prep_part_flag & 0x3fffffff));
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1611,6 +1621,7 @@ int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *o,
|
|
|
|
|
if(o->efi_boot_partition != NULL)
|
|
|
|
|
free(o->efi_boot_partition);
|
|
|
|
|
o->efi_boot_partition= NULL;
|
|
|
|
|
o->efi_boot_part_flag= 0;
|
|
|
|
|
if(path != NULL) {
|
|
|
|
|
o->efi_boot_partition= strdup(path);
|
|
|
|
|
if(o->efi_boot_partition == NULL) {
|
|
|
|
@ -1618,6 +1629,7 @@ int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *o,
|
|
|
|
|
return(-1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
o->efi_boot_part_flag = flag & 1;
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1626,6 +1638,8 @@ int isoburn_igopt_get_efi_bootp(struct isoburn_imgen_opts *opts,
|
|
|
|
|
char **path, int flag)
|
|
|
|
|
{
|
|
|
|
|
*path= opts->efi_boot_partition;
|
|
|
|
|
if(flag & 1)
|
|
|
|
|
return(1 + (opts->efi_boot_part_flag & 0x3fffffff));
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1675,6 +1689,39 @@ int isoburn_igopt_get_partition_img(struct isoburn_imgen_opts *opts,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int isoburn_igopt_set_part_flag(struct isoburn_imgen_opts *opts,
|
|
|
|
|
int partition_number, int flag)
|
|
|
|
|
{
|
|
|
|
|
char msg[80];
|
|
|
|
|
|
|
|
|
|
if (partition_number < 1 ||
|
|
|
|
|
partition_number > Libisoburn_max_appended_partitionS) {
|
|
|
|
|
sprintf(msg, "Partition number is out of range (1 ... %d)",
|
|
|
|
|
Libisoburn_max_appended_partitionS);
|
|
|
|
|
isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
|
|
|
|
opts->appended_part_flags[partition_number - 1]= flag;
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int isoburn_igopt_get_part_flags(struct isoburn_imgen_opts *opts,
|
|
|
|
|
int num_entries, int part_flags[])
|
|
|
|
|
{
|
|
|
|
|
int i, max_entry= 0;
|
|
|
|
|
|
|
|
|
|
for(i= 0; i < num_entries; i++)
|
|
|
|
|
part_flags[i]= 0;
|
|
|
|
|
for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
|
|
|
|
|
if(i < num_entries)
|
|
|
|
|
part_flags[i]= opts->appended_part_flags[i];
|
|
|
|
|
max_entry= i + 1;
|
|
|
|
|
}
|
|
|
|
|
return(max_entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int isoburn_igopt_set_appended_as_gpt(struct isoburn_imgen_opts *opts, int gpt)
|
|
|
|
|
{
|
|
|
|
|
opts->appended_as_gpt= !!gpt;
|
|
|
|
|