New API calls isoburn_igopt_set_stdio_endsync(), isoburn_igopt_get_stdio_endsync()

master
Thomas Schmitt 9 years ago
parent 1bfd24f856
commit 59c4712b1a
  1. 16
      libisoburn/isoburn.c
  2. 6
      libisoburn/isoburn.h
  3. 9
      libisoburn/isofs_wrap.c
  4. 31
      libisoburn/libisoburn.h
  5. 2
      libisoburn/libisoburn.ver
  6. 2
      xorriso/xorriso_timestamp.h

@ -150,6 +150,7 @@ int isoburn_new(struct isoburn **objpt, int flag)
o->msgs_submit_handle= NULL;
o->msgs_submit_flag= 0;
o->do_tao= 0;
o->do_fsync= 1;
o->prev= NULL;
o->next= NULL;
o->target_iso_head= calloc(1, o->target_iso_head_size);
@ -599,6 +600,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
}
out_o->do_tao = opts->do_tao;
out_o->do_fsync = opts->do_fsync;
state = isoburn_disc_get_status(in_d);
if (state != BURN_DISC_BLANK && state != BURN_DISC_APPENDABLE &&
@ -1134,6 +1136,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->hfsp_block_size= 0;
o->apm_block_size= 0;
o->do_tao= 0;
o->do_fsync= 0;
return(1);
}
@ -1755,6 +1758,19 @@ int isoburn_igopt_get_write_type(struct isoburn_imgen_opts *opts, int *do_tao)
return(1);
}
int isoburn_igopt_set_stdio_endsync(struct isoburn_imgen_opts *opts,
int do_sync)
{
opts->do_fsync= !!do_sync;
return(1);
}
int isoburn_igopt_get_stdio_endsync(struct isoburn_imgen_opts *opts,
int *do_sync)
{
*do_sync= opts->do_fsync;
return(1);
}
int isoburn_conv_name_chars(struct isoburn_imgen_opts *opts,
char *name, size_t name_len,

@ -166,6 +166,9 @@ struct isoburn {
/* Forwarding an image generation option to the burn wrapper */
int do_tao;
/* Forwarding an image generation option to the burn wrapper */
int do_fsync;
};
@ -705,6 +708,9 @@ struct isoburn_imgen_opts {
*/
int do_tao;
/* Whether to fsync() stdio_drives after isoburn_activate_session() */
int do_fsync;
};

@ -375,7 +375,7 @@ int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
*/
int isoburn_activate_session(struct burn_drive *drive)
{
int ret;
int ret, do_sync = 1;
struct isoburn *o;
ret = isoburn_find_emulator(&o, drive, 0);
@ -391,9 +391,12 @@ int isoburn_activate_session(struct burn_drive *drive)
(o->fabricated_disc_status == BURN_DISC_BLANK &&
o->zero_nwa > 0)))
return 1;
ret = burn_drive_get_drive_role(drive);
if (ret != 1)
do_sync = !! o->do_fsync;
ret = burn_random_access_write(drive, (off_t) 0, (char*)o->target_iso_head,
o->target_iso_head_size, 1);
o->target_iso_head_size, do_sync);
return ret;
}

@ -1532,7 +1532,7 @@ int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
numbers 2 to 8.
This will overwrite the first 512 bytes of
the submitted data.
@since 1.3.6
@since 1.3.8
4= HP-PA PALO boot sector header version 4
Submit all five parameters of
iso_image_set_hppa_palo() as non-NULL texts.
@ -1899,6 +1899,30 @@ int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts,
int isoburn_igopt_set_write_type(struct isoburn_imgen_opts *opts, int do_tao);
int isoburn_igopt_get_write_type(struct isoburn_imgen_opts *opts, int *do_tao);
/** Set or inquire whether a final fsync(2) is performed when updating the
multi-session information of libburn stdio pseudo-drives by
isoburn_activate_session().
Note:
fsync(2) calls during and at the end of isoburn_disc_write() are controlled
by libburn call burn_write_opts_set_stdio_fsync().
@since 1.2.4
@param opts
The option set to be manipulated or inquired.
@parm do_sync
1= call fsync(2) with stdio drives in isoburn_activate_session()
0= do not
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_set_stdio_endsync(struct isoburn_imgen_opts *opts,
int do_sync);
int isoburn_igopt_get_stdio_endsync(struct isoburn_imgen_opts *opts,
int *do_sync);
/* ----------------------------------------------------------------------- */
/* End of Options for image generation */
/* ----------------------------------------------------------------------- */
/** Frontend of libisofs call iso_conv_name_chars() controlled by
struct isoburn_imgen_opts rather than IsoWriteOpts.
@ -1940,11 +1964,6 @@ int isoburn_conv_name_chars(struct isoburn_imgen_opts *opts,
char **result, size_t *result_len, int flag);
/* ----------------------------------------------------------------------- */
/* End of Options for image generation */
/* ----------------------------------------------------------------------- */
/** Get the image attached to a drive, if any.
@since 0.1.0
@param d The drive to inquire

@ -46,6 +46,7 @@ isoburn_igopt_get_relaxed;
isoburn_igopt_get_rr_reloc;
isoburn_igopt_get_scdbackup_tag;
isoburn_igopt_get_sort_files;
isoburn_igopt_get_stdio_endsync;
isoburn_igopt_get_system_area;
isoburn_igopt_get_tail_blocks;
isoburn_igopt_get_untranslated_name_len;
@ -68,6 +69,7 @@ isoburn_igopt_set_relaxed;
isoburn_igopt_set_rr_reloc;
isoburn_igopt_set_scdbackup_tag;
isoburn_igopt_set_sort_files;
isoburn_igopt_set_stdio_endsync;
isoburn_igopt_set_system_area;
isoburn_igopt_set_tail_blocks;
isoburn_igopt_set_untranslated_name_len;

@ -1 +1 @@
#define Xorriso_timestamP "2014.04.13.071908"
#define Xorriso_timestamP "2014.04.13.120421"

Loading…
Cancel
Save