New API function isoburn_igopt_set_part_offset(), requiring libisofs 0.6.35
This commit is contained in:
@ -487,6 +487,39 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
|
||||
iso_write_opts_set_overwrite_buf(wopts,
|
||||
nwa>0 ? out_o->target_iso_head : NULL);
|
||||
|
||||
if (opts->partition_offset > 0) {
|
||||
|
||||
if (nwa > 0) {
|
||||
/* >>> refuse because for now this works only for single session with
|
||||
no_emul_toc
|
||||
<<< to be removed when multi session stuff is fully ready
|
||||
*/
|
||||
isoburn_msgs_submit(in_o, 0x00060000,
|
||||
"Programming error: non-zero NWA combined with partition offset",
|
||||
0, "FATAL", 0);
|
||||
{ret= -4; goto ex;}
|
||||
}
|
||||
|
||||
iso_write_opts_set_part_offset(wopts, opts->partition_offset,
|
||||
opts->partition_secs_per_head,
|
||||
opts->partition_heads_per_cyl);
|
||||
}
|
||||
#ifdef Libisoburn_partition_offseT
|
||||
#if Libisoburn_partition_offseT >= 16
|
||||
|
||||
else {
|
||||
/* <<< For preliminary testing of emulated TOC and partition offset.
|
||||
Problem is that only this macro can prepare the overwrite buffer
|
||||
for partition offset yet. Emulated TOC does not work yet.
|
||||
*/
|
||||
iso_write_opts_set_part_offset(wopts,
|
||||
(uint32_t) Libisoburn_partition_offseT,
|
||||
0, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ret = iso_image_create_burn_source(in_o->image, wopts, &wsrc);
|
||||
if (ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot create burn source", 0, "FAILURE", 0);
|
||||
@ -877,6 +910,9 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
||||
o->data_start_lba= -1;
|
||||
o->system_area_data= NULL;
|
||||
o->system_area_options= 0;
|
||||
o->partition_offset= 0;
|
||||
o->partition_secs_per_head= 0;
|
||||
o->partition_heads_per_cyl= 0;
|
||||
o->vol_creation_time= 0;
|
||||
o->vol_modification_time= 0;
|
||||
o->vol_expiration_time= 0;
|
||||
@ -1157,3 +1193,26 @@ int isoburn_igopt_get_pvd_times(struct isoburn_imgen_opts *opts,
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_part_offset(struct isoburn_imgen_opts *opts,
|
||||
uint32_t block_offset_2k,
|
||||
int secs_512_per_head, int heads_per_cyl)
|
||||
{
|
||||
if (block_offset_2k > 0 && block_offset_2k < 16)
|
||||
return(0);
|
||||
opts->partition_offset = block_offset_2k;
|
||||
opts->partition_secs_per_head = secs_512_per_head;
|
||||
opts->partition_heads_per_cyl = heads_per_cyl;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_part_offset(struct isoburn_imgen_opts *opts,
|
||||
uint32_t *block_offset_2k,
|
||||
int *secs_512_per_head, int *heads_per_cyl)
|
||||
{
|
||||
*block_offset_2k = opts->partition_offset;
|
||||
*secs_512_per_head = opts->partition_secs_per_head;
|
||||
*heads_per_cyl = opts->partition_heads_per_cyl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user