diff --git a/main.c b/main.c index 3dc76ad..23ffb29 100644 --- a/main.c +++ b/main.c @@ -52,6 +52,7 @@ static void usage(void) print_output(" -V show version\n"); print_output(" -t test compressed file integrity\n"); print_output(" -i show compressed file information\n"); + print_output(" -H display md5 Hash integrity information\n"); print_output("\nIf no filenames or \"-\" is specified, stdin/out will be used.\n"); } @@ -569,7 +570,7 @@ int main(int argc, char *argv[]) else if (!strstr(eptr,"NOCONFIG")) read_config(&control); - while ((c = getopt(argc, argv, "L:hdS:tVvDfqo:w:nlbMUO:T:N:p:gzi")) != -1) { + while ((c = getopt(argc, argv, "L:hdS:tVvDfqo:w:nlbMUO:T:N:p:gziH")) != -1) { switch (c) { case 'L': control.compression_level = atoi(optarg); @@ -683,6 +684,9 @@ int main(int argc, char *argv[]) case 'i': control.flags |= FLAG_INFO; break; + case 'H': + control.flags |= FLAG_HASH; + break; case 'h': usage(); return -1; diff --git a/runzip.c b/runzip.c index ecb0748..cad0750 100644 --- a/runzip.c +++ b/runzip.c @@ -243,7 +243,7 @@ i64 runzip_fd(int fd_in, int fd_out, int fd_hist, i64 expected_size) md5_finish_ctx (&control.ctx, md5_resblock); if (HASH_CHECK || VERBOSE) { - print_output("MD5 sum: "); + print_output("MD5: "); for (j = 0; j < MD5_DIGEST_SIZE; j++) print_output("%02x", md5_resblock[j] & 0xFF); print_output("\n"); diff --git a/rzip.c b/rzip.c index 66ad38c..ad5b7ea 100644 --- a/rzip.c +++ b/rzip.c @@ -917,7 +917,7 @@ retry: md5_finish_ctx (&control.ctx, md5_resblock); if (HASH_CHECK || VERBOSE) { - print_output("MD5 sum: "); + print_output("MD5: "); for (j = 0; j < MD5_DIGEST_SIZE; j++) print_output("%02x", md5_resblock[j] & 0xFF); print_output("\n");