Expanded new API call isoburn_igopt_set_scdbackup_tag

master
Thomas Schmitt 13 years ago
parent 7a1f61afaa
commit 72ac8a4ab1
  1. 12
      libisoburn/isoburn.c
  2. 4
      libisoburn/isoburn.h
  3. 10
      libisoburn/libisoburn.h
  4. 2
      xorriso/xorriso_timestamp.h

@ -436,7 +436,8 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
iso_write_opts_set_record_md5(wopts, opts->session_md5, opts->file_md5 & 3);
if(opts->scdbackup_tag_name[0] && opts->scdbackup_tag_time[0])
iso_write_opts_set_scdbackup_tag(wopts, opts->scdbackup_tag_name,
opts->scdbackup_tag_time);
opts->scdbackup_tag_time,
opts->scdbackup_tag_written);
iso_write_opts_set_replace_mode(wopts, opts->replace_dir_mode,
opts->replace_file_mode, opts->replace_uid, opts->replace_gid);
iso_write_opts_set_default_dir_mode(wopts, opts->dir_mode);
@ -1032,23 +1033,28 @@ int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp)
char *timestamp, char *tag_written)
{
strncpy(o->scdbackup_tag_name, name, 80);
o->scdbackup_tag_name[80]= 0;
strncpy(o->scdbackup_tag_time, timestamp, 18);
o->scdbackup_tag_time[18]= 0;
o->scdbackup_tag_written = tag_written;
if(tag_written != NULL)
tag_written[0]= 0;
return(1);
}
int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
char name[81], char timestamp[19])
char name[81], char timestamp[19],
char **tag_written)
{
strncpy(name, o->scdbackup_tag_name, 80);
name[80]= 0;
strncpy(timestamp, o->scdbackup_tag_time, 18);
timestamp[18]= 0;
*tag_written= o->scdbackup_tag_written;
return(1);
}

@ -479,9 +479,13 @@ struct isoburn_imgen_opts {
* Such a tag may be part of a libisofs checksum tag block after the
* session tag line. It then covers the whole session up to its own start
* position.
* If scdbackup_tag_written is not NULL then it is a pointer to an
* application provided array with at least 512 characters. The effectively
* written scdbackup tag will be copied to this memory location.
*/
char scdbackup_tag_name[81];
char scdbackup_tag_time[19];
char *scdbackup_tag_written;
};

@ -1151,12 +1151,18 @@ int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
@param name The tag name. 80 characters max.
@param timestamp A string of up to 13 characters YYMMDD.hhmmss
A9 = 2009, B0 = 2010, B1 = 2011, ... C0 = 2020, ...
@param tag_written Either NULL or the address of an array with at least 512
characters. In the latter case the eventually produced
scdbackup tag will be copied to this array when the image
gets written. This call sets scdbackup_tag_written[0] = 0
to mark its preliminary invalidity.
@return 1 success, <=0 failure
*/
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp);
char *timestamp, char *tag_written);
int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
char name[81], char timestamp[19]);
char name[81], char timestamp[19],
char **tag_written);
/* ----------------------------------------------------------------------- */

@ -1 +1 @@
#define Xorriso_timestamP "2009.09.16.162424"
#define Xorriso_timestamP "2009.09.17.144453"

Loading…
Cancel
Save