New -md5 modes load_check_off and load_check_on

master
Thomas Schmitt 12 years ago
parent a08a753967
commit 060484494d
  1. 12
      xorriso/drive_mgt.c
  2. 7
      xorriso/emulators.c
  3. 4
      xorriso/opts_i_o.c
  4. 8
      xorriso/text_io.c
  5. 1
      xorriso/xorriso_private.h
  6. 2
      xorriso/xorriso_timestamp.h

@ -368,11 +368,10 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
ext|= isoburn_ropt_noea;
if(xorriso->ino_behavior & 1)
ext|= isoburn_ropt_noino;
#ifdef isoburn_ropt_nomd5
if(!(xorriso->do_md5 & 1))
ext|= isoburn_ropt_nomd5;
#endif
if(xorriso->do_md5 & 32)
ext|= isoburn_ropt_nomd5tag;
isoburn_ropt_set_extensions(ropts, ext);
@ -422,8 +421,11 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, sev, 0);
if(read_ret == ISO_SB_TREE_CORRUPTED && (xorriso->do_md5 & 1)) {
Xorriso_msgs_submit(xorriso, 0,
"You might get a questionable ISO image tree by option -md5 'off'.",
0, "HINT", 0);
"This might be false MD5 alarm if an add-on session was written by growisofs.",
0, "HINT", 0);
Xorriso_msgs_submit(xorriso, 0,
"In this case you get an ISO image tree by option -md5 'load_check_off'",
0, "HINT", 0);
} else if(xorriso->img_read_error_mode!=0) {
Xorriso_msgs_submit(xorriso, 0, "You might get a partial or altered ISO image tree by option -error_behavior 'image_loading' 'best_effort' if -abort_on is set to be tolerant enough.",
0, "HINT", 0);

@ -899,7 +899,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int do_print_size= 0, fd, idx, iso_level= 1, emul_boot= 2;
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0;
int dir_mode= -1, file_mode= -1, count, partition_number, allow_dir_id_ext= 1;
int root_seen= 0;
int root_seen= 0, do_md5_mem;
mode_t mode_and, mode_or;
int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0;
int old_root_md5= 1, old_root_dev= 0, old_root_ino= 1;
@ -1188,7 +1188,12 @@ illegal_c:;
Xorriso_option_hardlinks(xorriso, "without_update", 0);
}
if(indev[0]) {
do_md5_mem= xorriso->do_md5;
if(xorriso->do_md5 & 1) /* MD5 loading is enabled */
xorriso->do_md5|= 32; /* Do not check tags of superblock,tree,session
because growisofs preserves the first sb tag.*/
ret= Xorriso_option_dev(xorriso, indev, 1);
xorriso->do_md5= do_md5_mem;
if(ret<=0)
goto ex;
}

@ -641,6 +641,10 @@ int Xorriso_option_md5(struct XorrisO *xorriso, char *mode, int flag)
xorriso->do_md5|= 8;
else if(l == 19 && strncmp(cpt, "stability_check_off", l) == 0)
xorriso->do_md5&= ~8;
else if(l == 13 && strncmp(cpt, "load_check_on", l) == 0)
xorriso->do_md5&= ~32;
else if(l == 14 && strncmp(cpt, "load_check_off", l) == 0)
xorriso->do_md5|= 32;
else {
sprintf(xorriso->info_text, "-md5: unknown mode ");
Text_shellsafe(cpt, xorriso->info_text, 1);

@ -1803,14 +1803,16 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
is_default= ((xorriso->do_md5 & 31) == 0);
sprintf(line, "-md5 ");
if(xorriso->do_md5 & 1) {
if((xorriso->do_md5 & (8)) == (8)) {
strcat(line, "all\n");
if((xorriso->do_md5 & 8) == 8) {
strcat(line, "all");
} else {
strcat(line, "on");
if(xorriso->do_md5 & 8)
strcat(line, ":stability_check_on");
strcat(line, "\n");
}
if(xorriso->do_md5 & 32)
strcat(line, ":load_check_off");
strcat(line, "\n");
} else
strcat(line, "off\n");
if(!(is_default && no_defaults))

@ -150,6 +150,7 @@ struct XorrisO { /* the global context of xorriso */
bit2= write MD5 for each data file
bit3= make file content stability check by double reading
bit4= use recorded MD5 as proxy of ISO file
bit5= with bit0: do not check tags of superblock,tree,session
*/
int no_emul_toc; /* bit0= On overwriteables:

@ -1 +1 @@
#define Xorriso_timestamP "2011.03.09.071325"
#define Xorriso_timestamP "2011.03.09.071502"

Loading…
Cancel
Save