[BusyBox-cvs] busybox/coreutils md5_sha1_sum.c,1.3,1.4
Glenn McGrath
bug1 at busybox.net
Thu Nov 20 05:58:31 UTC 2003
Update of /var/cvs/busybox/coreutils
In directory winder:/tmp/cvs-serv17496/coreutils
Modified Files:
md5_sha1_sum.c
Log Message:
Fix up the -s option, and make usage consitent with behaviour,
patch by Steven Scholz
Index: md5_sha1_sum.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/md5_sha1_sum.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- md5_sha1_sum.c 18 Nov 2003 23:56:41 -0000 1.3
+++ md5_sha1_sum.c 20 Nov 2003 05:58:26 -0000 1.4
@@ -143,16 +143,18 @@
hash_value = hash_file(filename_ptr, hash_algo);
if (hash_value && (strcmp(hash_value, line) == 0)) {
- printf("%s: OK\n", filename_ptr);
+ if (!(flags & FLAG_SILENT))
+ printf("%s: OK\n", filename_ptr);
} else {
- printf("%s: FAILED\n", filename_ptr);
+ if (!(flags & FLAG_SILENT))
+ printf("%s: FAILED\n", filename_ptr);
count_failed++;
}
/* possible free(NULL) */
free(hash_value);
free(line);
}
- if (count_failed) {
+ if (count_failed && !(flags & FLAG_SILENT)) {
bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
count_failed, count_total);
}
@@ -178,10 +180,7 @@
if (hash_value == NULL) {
return_value++;
} else {
-#ifdef CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
- if (!flags & FLAG_SILENT)
-#endif
- printf("%s %s\n", hash_value, file_ptr);
+ printf("%s %s\n", hash_value, file_ptr);
free(hash_value);
}
}
More information about the busybox-cvs
mailing list