Expanded new API call isoburn_igopt_set_scdbackup_tag

This commit is contained in:
Thomas Schmitt 2009-09-17 14:43:54 +00:00
parent 3000c539d7
commit c6429e4c36
4 changed files with 22 additions and 6 deletions

View File

@ -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); 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]) if(opts->scdbackup_tag_name[0] && opts->scdbackup_tag_time[0])
iso_write_opts_set_scdbackup_tag(wopts, opts->scdbackup_tag_name, 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, iso_write_opts_set_replace_mode(wopts, opts->replace_dir_mode,
opts->replace_file_mode, opts->replace_uid, opts->replace_gid); opts->replace_file_mode, opts->replace_uid, opts->replace_gid);
iso_write_opts_set_default_dir_mode(wopts, opts->dir_mode); 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, 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); strncpy(o->scdbackup_tag_name, name, 80);
o->scdbackup_tag_name[80]= 0; o->scdbackup_tag_name[80]= 0;
strncpy(o->scdbackup_tag_time, timestamp, 18); strncpy(o->scdbackup_tag_time, timestamp, 18);
o->scdbackup_tag_time[18]= 0; o->scdbackup_tag_time[18]= 0;
o->scdbackup_tag_written = tag_written;
if(tag_written != NULL)
tag_written[0]= 0;
return(1); return(1);
} }
int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o, 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); strncpy(name, o->scdbackup_tag_name, 80);
name[80]= 0; name[80]= 0;
strncpy(timestamp, o->scdbackup_tag_time, 18); strncpy(timestamp, o->scdbackup_tag_time, 18);
timestamp[18]= 0; timestamp[18]= 0;
*tag_written= o->scdbackup_tag_written;
return(1); return(1);
} }

View File

@ -479,9 +479,13 @@ struct isoburn_imgen_opts {
* Such a tag may be part of a libisofs checksum tag block after the * 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 * session tag line. It then covers the whole session up to its own start
* position. * 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_name[81];
char scdbackup_tag_time[19]; char scdbackup_tag_time[19];
char *scdbackup_tag_written;
}; };

View File

@ -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 name The tag name. 80 characters max.
@param timestamp A string of up to 13 characters YYMMDD.hhmmss @param timestamp A string of up to 13 characters YYMMDD.hhmmss
A9 = 2009, B0 = 2010, B1 = 2011, ... C0 = 2020, ... 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 @return 1 success, <=0 failure
*/ */
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name, 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, 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);
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */

View File

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