New API call iso_write_opts_set_scdbackup_tag()

This commit is contained in:
Thomas Schmitt 2009-08-31 21:04:29 +00:00
parent 491dc71cc0
commit e7f24bd65c
4 changed files with 56 additions and 2 deletions

View File

@ -434,6 +434,9 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
iso_write_opts_set_aaip_susp_1_10(wopts, opts->aaip_susp_1_10);
iso_write_opts_set_sort_files(wopts, opts->sort_files);
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);
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);
@ -1027,3 +1030,25 @@ int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
return(1);
}
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp)
{
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;
return(1);
}
int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
char name[81], char timestamp[19])
{
strncpy(name, o->scdbackup_tag_name, 80);
name[80]= 0;
strncpy(timestamp, o->scdbackup_tag_time, 18);
timestamp[18]= 0;
return(1);
}

View File

@ -471,6 +471,18 @@ struct isoburn_imgen_opts {
If >=16: Valid block number. Block size is always 2 KiB.
*/
int data_start_lba;
/**
* If not empty: Parameters "name" and "timestamp" for a scdbackup stream
* checksum tag. See scdbackup/README appendix VERIFY.
* It makes sense only for single session images which start at LBA 0.
* 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.
*/
char scdbackup_tag_name[81];
char scdbackup_tag_time[19];
};

View File

@ -216,7 +216,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/
#define isoburn_libisofs_req_major 0
#define isoburn_libisofs_req_minor 6
#define isoburn_libisofs_req_micro 22
#define isoburn_libisofs_req_micro 23
/** The minimum version of libburn to be used with this version of libisoburn
at compile time.
@ -1141,6 +1141,23 @@ int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
/** Set resp. get parameters "name" and "timestamp" for a scdbackup checksum
tag. It will be appended to the libisofs session tag if the image starts at
LBA 0. See isoburn_disc_track_lba_nwa. The scdbackup tag can be used
to verify the image by command scdbackup_verify <device> -auto_end.
See scdbackup/README appendix VERIFY for its inner details.
@since 0.4.4
@param o The option set to work on
@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, ...
@return 1 success, <=0 failure
*/
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp);
int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
char name[81], char timestamp[19]);
/* ----------------------------------------------------------------------- */
/* End of Options for image generation */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.08.31.162746"
#define Xorriso_timestamP "2009.08.31.210528"