New option -md5, new -as mkisofs option --md5
This commit is contained in:
parent
1c3c8fa869
commit
6b1dac2161
@ -2,7 +2,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH XORRISO 1 "Aug 09, 2009"
|
.TH XORRISO 1 "Aug 10, 2009"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -750,6 +750,14 @@ same filesystems. Use this if mode "on" always sees all files changed.
|
|||||||
The speed advantage appears only if the loaded session was produced with
|
The speed advantage appears only if the loaded session was produced with
|
||||||
-disk_dev_ino "on" too.
|
-disk_dev_ino "on" too.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-md5\fR "on"|"off"
|
||||||
|
Enable or disable processing of MD5 checksums for the overall session and for
|
||||||
|
each single data file. If enabled then MD5 checksums get loaded from the image
|
||||||
|
if there are any. At image generation time they are computed for each file
|
||||||
|
which gets its data written into the new session. The checksums of files which
|
||||||
|
have their data in older sessions get copied into the new session.
|
||||||
|
For now checksums can be exploited only via find action get_md5.
|
||||||
|
.TP
|
||||||
\fB\-rom_toc_scan\fR "on"|"off"[:"emul_on"|"emul_off"]
|
\fB\-rom_toc_scan\fR "on"|"off"[:"emul_on"|"emul_off"]
|
||||||
Read-only drives do not tell the actual media type but show any media as
|
Read-only drives do not tell the actual media type but show any media as
|
||||||
ROM (e.g. as DVD-ROM). The session history of MMC multi-session media might
|
ROM (e.g. as DVD-ROM). The session history of MMC multi-session media might
|
||||||
|
@ -5265,6 +5265,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
|||||||
m->ino_behavior= 7;
|
m->ino_behavior= 7;
|
||||||
m->do_joliet= 0;
|
m->do_joliet= 0;
|
||||||
m->do_aaip= 0;
|
m->do_aaip= 0;
|
||||||
|
m->do_md5= 0;
|
||||||
m->relax_compliance= 0;
|
m->relax_compliance= 0;
|
||||||
m->do_follow_pattern= 1;
|
m->do_follow_pattern= 1;
|
||||||
m->do_follow_param= 0;
|
m->do_follow_param= 0;
|
||||||
@ -7664,6 +7665,11 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
|||||||
if(!(is_default && no_defaults))
|
if(!(is_default && no_defaults))
|
||||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||||
|
|
||||||
|
is_default= ((xorriso->do_md5 & (1 | 2 | 4)) == 0);
|
||||||
|
sprintf(line,"-md5 %s\n", (xorriso->do_md5 & 1 ? "on" : "off"));
|
||||||
|
if(!(is_default && no_defaults))
|
||||||
|
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||||
|
|
||||||
is_default= (Xorriso_get_relax_text(xorriso, sfe, 0) == 2);
|
is_default= (Xorriso_get_relax_text(xorriso, sfe, 0) == 2);
|
||||||
sprintf(line,"-compliance %s\n", sfe);
|
sprintf(line,"-compliance %s\n", sfe);
|
||||||
if(!(is_default && no_defaults))
|
if(!(is_default && no_defaults))
|
||||||
@ -11226,6 +11232,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
|
|||||||
" --hardlinks Record eventual hard link relations of files",
|
" --hardlinks Record eventual hard link relations of files",
|
||||||
" --acl Record eventual ACLs of files",
|
" --acl Record eventual ACLs of files",
|
||||||
" --xattr Record eventual user space xattr of files",
|
" --xattr Record eventual user space xattr of files",
|
||||||
|
" --md5 Compute and record MD5 checksums of data files",
|
||||||
" -V ID, -volid ID Set Volume ID",
|
" -V ID, -volid ID Set Volume ID",
|
||||||
" -b FILE, -eltorito-boot FILE",
|
" -b FILE, -eltorito-boot FILE",
|
||||||
" Set El Torito boot image name",
|
" Set El Torito boot image name",
|
||||||
@ -11387,6 +11394,8 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
|
|||||||
Xorriso_option_acl(xorriso, "on", 0);
|
Xorriso_option_acl(xorriso, "on", 0);
|
||||||
} else if(strcmp(argv[i], "--xattr")==0) {
|
} else if(strcmp(argv[i], "--xattr")==0) {
|
||||||
Xorriso_option_xattr(xorriso, "on", 0);
|
Xorriso_option_xattr(xorriso, "on", 0);
|
||||||
|
} else if(strcmp(argv[i], "--md5")==0) {
|
||||||
|
Xorriso_option_md5(xorriso, "on", 0);
|
||||||
} else if(strcmp(argv[i], "-z")==0 ||
|
} else if(strcmp(argv[i], "-z")==0 ||
|
||||||
strcmp(argv[i], "-transparent-compression")==0) {
|
strcmp(argv[i], "-transparent-compression")==0) {
|
||||||
Xorriso_option_zisofs(xorriso, "by_magic=on", 0);
|
Xorriso_option_zisofs(xorriso, "by_magic=on", 0);
|
||||||
@ -11600,6 +11609,8 @@ not_enough_args:;
|
|||||||
/* was already handled in first argument scan */;
|
/* was already handled in first argument scan */;
|
||||||
} else if(strcmp(argv[i], "--xattr")==0) {
|
} else if(strcmp(argv[i], "--xattr")==0) {
|
||||||
/* was already handled in first argument scan */;
|
/* was already handled in first argument scan */;
|
||||||
|
} else if(strcmp(argv[i], "--md5")==0) {
|
||||||
|
/* was already handled in first argument scan */;
|
||||||
} else if(strcmp(argv[i], "-z")==0 ||
|
} else if(strcmp(argv[i], "-z")==0 ||
|
||||||
strcmp(argv[i], "-transparent-compression")==0) {
|
strcmp(argv[i], "-transparent-compression")==0) {
|
||||||
/* was already handled in first argument scan */;
|
/* was already handled in first argument scan */;
|
||||||
@ -15840,6 +15851,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" -disk_dev_ino \"on\"|\"ino_only\"|\"off\"",
|
" -disk_dev_ino \"on\"|\"ino_only\"|\"off\"",
|
||||||
" Enable resp. disable recording of disk file dev_t and ino_t",
|
" Enable resp. disable recording of disk file dev_t and ino_t",
|
||||||
" and their use in file comparison.",
|
" and their use in file comparison.",
|
||||||
|
" -md5 \"on\"|\"off\"",
|
||||||
|
" Enable resp. disable processing of MD5 checksums.",
|
||||||
" -ban_stdio_write",
|
" -ban_stdio_write",
|
||||||
" Allow for writing only the usage of optical drives.",
|
" Allow for writing only the usage of optical drives.",
|
||||||
" -blank \"fast\"|\"all\"|\"deformat\"|\"deformat_quickest\"",
|
" -blank \"fast\"|\"all\"|\"deformat\"|\"deformat_quickest\"",
|
||||||
@ -16885,6 +16898,22 @@ int Xorriso_option_mark(struct XorrisO *xorriso, char *mark, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Option -md5 "on"|"off" */
|
||||||
|
int Xorriso_option_md5(struct XorrisO *xorriso, char *mode, int flag)
|
||||||
|
{
|
||||||
|
if(strcmp(mode, "off")==0)
|
||||||
|
xorriso->do_md5&= ~7;
|
||||||
|
else if(strcmp(mode, "on")==0)
|
||||||
|
xorriso->do_md5|= (1 | 2 | 4);
|
||||||
|
else {
|
||||||
|
sprintf(xorriso->info_text, "-md5: unknown mode '%s'", mode);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Option -mkdir alias -mkdiri */
|
/* Option -mkdir alias -mkdiri */
|
||||||
int Xorriso_option_mkdiri(struct XorrisO *xorriso, int argc, char **argv,
|
int Xorriso_option_mkdiri(struct XorrisO *xorriso, int argc, char **argv,
|
||||||
int *idx, int flag)
|
int *idx, int flag)
|
||||||
@ -19014,7 +19043,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
|||||||
"dev","dialog","disk_dev_ino","disk_pattern","dummy","eject",
|
"dev","dialog","disk_dev_ino","disk_pattern","dummy","eject",
|
||||||
"iso_rr_pattern","follow","format","fs","gid","grow_blindly","hardlinks",
|
"iso_rr_pattern","follow","format","fs","gid","grow_blindly","hardlinks",
|
||||||
"history","indev","in_charset","joliet","list_delimiter","local_charset",
|
"history","indev","in_charset","joliet","list_delimiter","local_charset",
|
||||||
"mark","not_leaf","not_list","not_mgt",
|
"mark","md5","not_leaf","not_list","not_mgt",
|
||||||
"options_from_file","osirrox","outdev","out_charset","overwrite",
|
"options_from_file","osirrox","outdev","out_charset","overwrite",
|
||||||
"pacifier","padding","path_list","pathspecs","pkt_output","print","prompt",
|
"pacifier","padding","path_list","pathspecs","pkt_output","print","prompt",
|
||||||
"prog","prog_help","publisher","quoted_not_list","quoted_path_list",
|
"prog","prog_help","publisher","quoted_not_list","quoted_path_list",
|
||||||
@ -19518,6 +19547,10 @@ next_command:;
|
|||||||
(*idx)++;
|
(*idx)++;
|
||||||
ret= Xorriso_option_mark(xorriso, arg1, 0);
|
ret= Xorriso_option_mark(xorriso, arg1, 0);
|
||||||
|
|
||||||
|
} else if(strcmp(cmd, "md5")==0) {
|
||||||
|
(*idx)++;
|
||||||
|
ret= Xorriso_option_md5(xorriso, arg1, 0);
|
||||||
|
|
||||||
} else if(strcmp(cmd, "mount") == 0 || strcmp(cmd, "mount_cmd") == 0) {
|
} else if(strcmp(cmd, "mount") == 0 || strcmp(cmd, "mount_cmd") == 0) {
|
||||||
(*idx)+= 4;
|
(*idx)+= 4;
|
||||||
if((*idx)>argc) {
|
if((*idx)>argc) {
|
||||||
|
@ -124,6 +124,11 @@ struct XorrisO { /* the global context of xorriso */
|
|||||||
bit9= allow to set input charset from xattr "isofs.cs"
|
bit9= allow to set input charset from xattr "isofs.cs"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
int do_md5; /* bit0= read MD5 array
|
||||||
|
bit1= write session MD5
|
||||||
|
bit2= wite MD5 for each data file
|
||||||
|
*/
|
||||||
|
|
||||||
int relax_compliance; /* opaque bitfield to be set by xorrisoburn */
|
int relax_compliance; /* opaque bitfield to be set by xorrisoburn */
|
||||||
int do_follow_pattern;
|
int do_follow_pattern;
|
||||||
int do_follow_param;
|
int do_follow_param;
|
||||||
@ -835,6 +840,7 @@ struct ExprtesT {
|
|||||||
11= -decision char *arg1 ("yes", "no")
|
11= -decision char *arg1 ("yes", "no")
|
||||||
12= -prune
|
12= -prune
|
||||||
13= -wholename char *arg1 (regex_t in *arg2)
|
13= -wholename char *arg1 (regex_t in *arg2)
|
||||||
|
14= -has_any_xattr
|
||||||
*/
|
*/
|
||||||
int test_type;
|
int test_type;
|
||||||
|
|
||||||
@ -936,6 +942,8 @@ struct FindjoB {
|
|||||||
30= internal: count by xorriso->node_counter
|
30= internal: count by xorriso->node_counter
|
||||||
31= internal: register in xorriso->node_array
|
31= internal: register in xorriso->node_array
|
||||||
32= internal: widen_hardlinks disk_equiv: update nodes marked in di_do_widen
|
32= internal: widen_hardlinks disk_equiv: update nodes marked in di_do_widen
|
||||||
|
33= get_any_xattr
|
||||||
|
34= get_md5
|
||||||
*/
|
*/
|
||||||
int action;
|
int action;
|
||||||
int prune;
|
int prune;
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2009.08.10.192240"
|
#define Xorriso_timestamP "2009.08.10.193843"
|
||||||
|
@ -1122,10 +1122,12 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|||||||
ext|= isoburn_ropt_noacl;
|
ext|= isoburn_ropt_noacl;
|
||||||
if(!(xorriso->do_aaip & 4))
|
if(!(xorriso->do_aaip & 4))
|
||||||
ext|= isoburn_ropt_noea;
|
ext|= isoburn_ropt_noea;
|
||||||
|
|
||||||
#ifdef isoburn_ropt_noino
|
|
||||||
if(xorriso->ino_behavior & 1)
|
if(xorriso->ino_behavior & 1)
|
||||||
ext|= isoburn_ropt_noino;
|
ext|= isoburn_ropt_noino;
|
||||||
|
|
||||||
|
#ifdef isoburn_ropt_nomd5
|
||||||
|
if(!(xorriso->do_md5 & 1))
|
||||||
|
ext|= isoburn_ropt_nomd5;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
isoburn_ropt_set_extensions(ropts, ext);
|
isoburn_ropt_set_extensions(ropts, ext);
|
||||||
@ -1787,7 +1789,11 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
((!!xorriso->do_joliet) * isoburn_igopt_joliet) |
|
((!!xorriso->do_joliet) * isoburn_igopt_joliet) |
|
||||||
(( !(xorriso->ino_behavior & 2)) * isoburn_igopt_hardlinks) |
|
(( !(xorriso->ino_behavior & 2)) * isoburn_igopt_hardlinks) |
|
||||||
(( (!(xorriso->ino_behavior & 2)) ||
|
(( (!(xorriso->ino_behavior & 2)) ||
|
||||||
(xorriso->do_aaip & (2 | 8 | 16 | 256))) * isoburn_igopt_aaip);
|
(xorriso->do_aaip & (2 | 8 | 16 | 256)) ||
|
||||||
|
(xorriso->do_md5 & (2 | 4))
|
||||||
|
) * isoburn_igopt_aaip) |
|
||||||
|
((!!(xorriso->do_md5 & 2)) * isoburn_igopt_session_md5) |
|
||||||
|
((!!(xorriso->do_md5 & 4)) * isoburn_igopt_file_md5);
|
||||||
isoburn_igopt_set_extensions(sopts, ext);
|
isoburn_igopt_set_extensions(sopts, ext);
|
||||||
isoburn_igopt_set_relaxed(sopts, relax);
|
isoburn_igopt_set_relaxed(sopts, relax);
|
||||||
isoburn_igopt_set_sort_files(sopts, 1);
|
isoburn_igopt_set_sort_files(sopts, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user