mirror of
https://github.com/sheumann/hush.git
synced 2025-01-14 12:30:40 +00:00
Make md5sum not display filename when reading stdin
-Erik
This commit is contained in:
parent
dbcd8ce464
commit
7aa1f5c42a
@ -901,7 +901,12 @@ int md5sum_main(int argc,
|
|||||||
|
|
||||||
fail = md5_file (file, binary, md5buffer);
|
fail = md5_file (file, binary, md5buffer);
|
||||||
err |= fail;
|
err |= fail;
|
||||||
if (!fail) {
|
if (!fail && STREQ(file, "-")) {
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < 16; ++i)
|
||||||
|
printf ("%02x", md5buffer[i]);
|
||||||
|
putchar ('\n');
|
||||||
|
} else if (!fail) {
|
||||||
size_t i;
|
size_t i;
|
||||||
/* Output a leading backslash if the file name contains
|
/* Output a leading backslash if the file name contains
|
||||||
a newline or backslash. */
|
a newline or backslash. */
|
||||||
|
7
md5sum.c
7
md5sum.c
@ -901,7 +901,12 @@ int md5sum_main(int argc,
|
|||||||
|
|
||||||
fail = md5_file (file, binary, md5buffer);
|
fail = md5_file (file, binary, md5buffer);
|
||||||
err |= fail;
|
err |= fail;
|
||||||
if (!fail) {
|
if (!fail && STREQ(file, "-")) {
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < 16; ++i)
|
||||||
|
printf ("%02x", md5buffer[i]);
|
||||||
|
putchar ('\n');
|
||||||
|
} else if (!fail) {
|
||||||
size_t i;
|
size_t i;
|
||||||
/* Output a leading backslash if the file name contains
|
/* Output a leading backslash if the file name contains
|
||||||
a newline or backslash. */
|
a newline or backslash. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user