mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-03 07:00:03 +01:00
Add option to display hash information without enabling verbose mode.
This commit is contained in:
parent
4036125f94
commit
44a279579e
6
main.c
6
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;
|
||||
|
|
|
|||
2
runzip.c
2
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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue