Provisory new API calls isoburn_igopt_set_prep_partition, isoburn_igopt_set_efi_bootp
This commit is contained in:
parent
f2422356cf
commit
f133a1eee3
@ -571,6 +571,22 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
|
||||
opts->partition_secs_per_head,
|
||||
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);
|
||||
if(ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot set path for PreP partition",
|
||||
0, "FAILURE", 0);
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
}
|
||||
if(opts->efi_boot_partition != NULL) {
|
||||
ret = iso_write_opts_set_efi_bootp(wopts, opts->efi_boot_partition, 0);
|
||||
if(ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot set path for EFI system partition",
|
||||
0, "FAILURE", 0);
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
}
|
||||
for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
|
||||
if(opts->appended_partitions[i] == NULL)
|
||||
continue;
|
||||
@ -1072,6 +1088,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
||||
o->vol_effective_time= 0;
|
||||
o->libjte_handle= NULL;
|
||||
o->tail_blocks= 0;
|
||||
o->prep_partition= NULL;
|
||||
o->efi_boot_partition= NULL;
|
||||
for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
|
||||
o->appended_partitions[i]= NULL;
|
||||
o->appended_part_types[i]= 0;
|
||||
@ -1089,6 +1107,10 @@ int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag)
|
||||
return(0);
|
||||
if((*o)->rr_reloc_dir != NULL)
|
||||
free((*o)->rr_reloc_dir);
|
||||
if((*o)->prep_partition != NULL)
|
||||
free((*o)->prep_partition);
|
||||
if((*o)->efi_boot_partition != NULL)
|
||||
free((*o)->efi_boot_partition);
|
||||
for(i= 0; i < Libisoburn_max_appended_partitionS; i++)
|
||||
if((*o)->appended_partitions[i] != NULL)
|
||||
free((*o)->appended_partitions[i]);
|
||||
@ -1513,6 +1535,56 @@ int isoburn_igopt_get_tail_blocks(struct isoburn_imgen_opts *opts,
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *o,
|
||||
char *path, int flag)
|
||||
{
|
||||
if(o->prep_partition != NULL)
|
||||
free(o->prep_partition);
|
||||
o->prep_partition= NULL;
|
||||
if(path != NULL) {
|
||||
o->prep_partition= strdup(path);
|
||||
if(o->prep_partition == NULL) {
|
||||
isoburn_report_iso_error(ISO_OUT_OF_MEM, "Out of memory", 0, "FATAL", 0);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_prep_partition(struct isoburn_imgen_opts *opts,
|
||||
char **path, int flag)
|
||||
{
|
||||
*path= opts->prep_partition;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *o,
|
||||
char *path, int flag)
|
||||
{
|
||||
if(o->efi_boot_partition != NULL)
|
||||
free(o->efi_boot_partition);
|
||||
o->efi_boot_partition= NULL;
|
||||
if(path != NULL) {
|
||||
o->efi_boot_partition= strdup(path);
|
||||
if(o->efi_boot_partition == NULL) {
|
||||
isoburn_report_iso_error(ISO_OUT_OF_MEM, "Out of memory", 0, "FATAL", 0);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_efi_bootp(struct isoburn_imgen_opts *opts,
|
||||
char **path, int flag)
|
||||
{
|
||||
*path= opts->efi_boot_partition;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_partition_img(struct isoburn_imgen_opts *opts,
|
||||
int partition_number, uint8_t partition_type,
|
||||
char *image_path)
|
||||
|
@ -664,6 +664,10 @@ struct isoburn_imgen_opts {
|
||||
*/
|
||||
uint32_t tail_blocks;
|
||||
|
||||
/* Disk file paths of content of PreP partition and EFI system partition */
|
||||
char *prep_partition;
|
||||
char *efi_boot_partition;
|
||||
|
||||
/* Eventual disk file paths of prepared images which shall be appended
|
||||
after the ISO image and described by partiton table entries in a MBR.
|
||||
*/
|
||||
|
@ -1644,6 +1644,40 @@ int isoburn_igopt_get_tail_blocks(struct isoburn_imgen_opts *opts,
|
||||
uint32_t *num_blocks);
|
||||
|
||||
|
||||
/** Copy a data file from the local filesystem into the emerging ISO image.
|
||||
Mark it by an MBR partition entry as PreP partition and also cause
|
||||
protective MBR partition entries before and after this partition.
|
||||
See libisofs.h iso_write_opts_set_prep_img().
|
||||
@since 1.2.4
|
||||
@param opts
|
||||
The option set to be manipulated.
|
||||
@param path
|
||||
File address in the local file system.
|
||||
@param flag
|
||||
Reserved for future usage, set to 0.
|
||||
@return 1 success, <=0 failure
|
||||
*/
|
||||
int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *opts,
|
||||
char *path, int flag);
|
||||
int isoburn_igopt_get_prep_partition(struct isoburn_imgen_opts *opts,
|
||||
char **path, int flag);
|
||||
|
||||
/** Copy a data file from the local filesystem into the emerging ISO image.
|
||||
@since 1.2.4
|
||||
@param opts
|
||||
The option set to be manipulated.
|
||||
@param path
|
||||
File address in the local file system.
|
||||
@param flag
|
||||
Reserved for future usage, set to 0.
|
||||
@return 1 success, <=0 failure
|
||||
*/
|
||||
int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *opts,
|
||||
char *path, int flag);
|
||||
int isoburn_igopt_get_efi_bootp(struct isoburn_imgen_opts *opts,
|
||||
char **path, int flag);
|
||||
|
||||
|
||||
/** Cause an arbitrary data file to be appended to the ISO image and to be
|
||||
described by a partition table entry in an MBR or SUN Disk Label at the
|
||||
start of the ISO image.
|
||||
|
@ -29,6 +29,7 @@ isoburn_igopt_detach_jte;
|
||||
isoburn_igopt_get_data_start;
|
||||
isoburn_igopt_get_disc_label;
|
||||
isoburn_igopt_get_effective_lba;
|
||||
isoburn_igopt_get_efi_bootp;
|
||||
isoburn_igopt_get_extensions;
|
||||
isoburn_igopt_get_fifo_size;
|
||||
isoburn_igopt_get_hfsp_serial_number;
|
||||
@ -37,6 +38,7 @@ isoburn_igopt_get_out_charset;
|
||||
isoburn_igopt_get_over_mode;
|
||||
isoburn_igopt_get_over_ugid;
|
||||
isoburn_igopt_get_partition_img;
|
||||
isoburn_igopt_get_prep_partition;
|
||||
isoburn_igopt_get_pvd_times;
|
||||
isoburn_igopt_get_relaxed;
|
||||
isoburn_igopt_get_rr_reloc;
|
||||
@ -47,6 +49,7 @@ isoburn_igopt_get_tail_blocks;
|
||||
isoburn_igopt_get_untranslated_name_len;
|
||||
isoburn_igopt_new;
|
||||
isoburn_igopt_set_disc_label;
|
||||
isoburn_igopt_set_efi_bootp;
|
||||
isoburn_igopt_set_extensions;
|
||||
isoburn_igopt_set_fifo_size;
|
||||
isoburn_igopt_set_hfsp_serial_number;
|
||||
@ -55,6 +58,7 @@ isoburn_igopt_set_out_charset;
|
||||
isoburn_igopt_set_over_mode;
|
||||
isoburn_igopt_set_over_ugid;
|
||||
isoburn_igopt_set_partition_img;
|
||||
isoburn_igopt_set_prep_partition;
|
||||
isoburn_igopt_set_pvd_times;
|
||||
isoburn_igopt_set_relaxed;
|
||||
isoburn_igopt_set_rr_reloc;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2012.06.10.184210"
|
||||
#define Xorriso_timestamP "2012.06.12.113220"
|
||||
|
Loading…
Reference in New Issue
Block a user