From a0a380dbc8e446254fd1ce4272ae2a86e32054c1 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 19 Aug 2009 18:05:36 +0000 Subject: [PATCH] Adapted to enhanced iso_write_opts_set_record_md5() --- libisoburn/trunk/libisoburn/isoburn.c | 6 +++--- libisoburn/trunk/libisoburn/isoburn.h | 6 ++++-- libisoburn/trunk/libisoburn/libisoburn.h | 21 +++++++++++++------- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/libisoburn/trunk/libisoburn/isoburn.c b/libisoburn/trunk/libisoburn/isoburn.c index 0a77c9b0..a0dacaaf 100644 --- a/libisoburn/trunk/libisoburn/isoburn.c +++ b/libisoburn/trunk/libisoburn/isoburn.c @@ -433,7 +433,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d, iso_write_opts_set_dir_rec_mtime(wopts, opts->dir_rec_mtime); 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); + iso_write_opts_set_record_md5(wopts, opts->session_md5, opts->file_md5 & 3); 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); @@ -879,7 +879,7 @@ int isoburn_igopt_set_extensions(struct isoburn_imgen_opts *o, int ext) o->hardlinks= !!(ext & 8); o->aaip= !!(ext & 32); o->session_md5= !!(ext & 64); - o->file_md5= !!(ext & 128); + o->file_md5= (ext & (128 | 256)) >> 7; return(1); } @@ -888,7 +888,7 @@ int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext) { *ext= (!!o->rockridge) | ((!!o->joliet)<<1) | ((!!o->iso1999)<<2) | ((!!o->hardlinks) << 3) | ((!!o->aaip) << 5) | - ((!!o->session_md5) << 6) | ((!!o->file_md5) << 7); + ((!!o->session_md5) << 6) | ((o->file_md5 & 3) << 7); return(1); } diff --git a/libisoburn/trunk/libisoburn/isoburn.h b/libisoburn/trunk/libisoburn/isoburn.h index 3ff8f4ca..4411e3ce 100644 --- a/libisoburn/trunk/libisoburn/isoburn.h +++ b/libisoburn/trunk/libisoburn/isoburn.h @@ -334,8 +334,10 @@ struct isoburn_imgen_opts { /* Produce and write a MD5 checksum of the whole session stream. */ unsigned int session_md5 :1; - /* Produce and write MD5 checksums for each single IsoFile. */ - unsigned int file_md5 :1; + /* Produce and write MD5 checksums for each single IsoFile. + See parameter files of iso_write_opts_set_record_md5(). + */ + unsigned int file_md5 :2; /* relaxed constraints */ diff --git a/libisoburn/trunk/libisoburn/libisoburn.h b/libisoburn/trunk/libisoburn/libisoburn.h index c85acd16..a3b0d697 100644 --- a/libisoburn/trunk/libisoburn/libisoburn.h +++ b/libisoburn/trunk/libisoburn/libisoburn.h @@ -934,15 +934,22 @@ int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level); bit7= file_md5 @since 0.4.2 Produce and write MD5 checksums for each single IsoFile. + bit8= file_stability (only together with file_md5) + @since 0.4.2 + Compute MD5 of each file before copying it into the image and + compare this with the MD5 of the actual copying. If they do + not match then issue MISHAP event. + See also libisofs.h iso_write_opts_set_record_md5() @return 1 success, <=0 failure */ -#define isoburn_igopt_rockridge 1 -#define isoburn_igopt_joliet 2 -#define isoburn_igopt_iso1999 4 -#define isoburn_igopt_hardlinks 8 -#define isoburn_igopt_aaip 32 -#define isoburn_igopt_session_md5 64 -#define isoburn_igopt_file_md5 128 +#define isoburn_igopt_rockridge 1 +#define isoburn_igopt_joliet 2 +#define isoburn_igopt_iso1999 4 +#define isoburn_igopt_hardlinks 8 +#define isoburn_igopt_aaip 32 +#define isoburn_igopt_session_md5 64 +#define isoburn_igopt_file_md5 128 +#define isoburn_igopt_file_stability 256 int isoburn_igopt_set_extensions(struct isoburn_imgen_opts *o, int ext); int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext); diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index c4d9cc54..65f11809 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2009.08.18.191013" +#define Xorriso_timestamP "2009.08.19.180632"