From c6429e4c363bf1821e74cbf89c27eb5b2ad3d5fb Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 17 Sep 2009 14:43:54 +0000 Subject: [PATCH] Expanded new API call isoburn_igopt_set_scdbackup_tag --- libisoburn/trunk/libisoburn/isoburn.c | 12 +++++++++--- libisoburn/trunk/libisoburn/isoburn.h | 4 ++++ libisoburn/trunk/libisoburn/libisoburn.h | 10 ++++++++-- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/libisoburn/trunk/libisoburn/isoburn.c b/libisoburn/trunk/libisoburn/isoburn.c index 6f400052..dc67be8e 100644 --- a/libisoburn/trunk/libisoburn/isoburn.c +++ b/libisoburn/trunk/libisoburn/isoburn.c @@ -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); } diff --git a/libisoburn/trunk/libisoburn/isoburn.h b/libisoburn/trunk/libisoburn/isoburn.h index 5b2173ae..dcd09c60 100644 --- a/libisoburn/trunk/libisoburn/isoburn.h +++ b/libisoburn/trunk/libisoburn/isoburn.h @@ -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; }; diff --git a/libisoburn/trunk/libisoburn/libisoburn.h b/libisoburn/trunk/libisoburn/libisoburn.h index 4770f580..4e80697b 100644 --- a/libisoburn/trunk/libisoburn/libisoburn.h +++ b/libisoburn/trunk/libisoburn/libisoburn.h @@ -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); /* ----------------------------------------------------------------------- */ diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 0107ee07..5f56ff70 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2009.09.16.162424" +#define Xorriso_timestamP "2009.09.17.144453"