]> git.ipfire.org Git - thirdparty/coreutils.git/commit
sum: always output a file name if one passed
authorPádraig Brady <P@draigBrady.com>
Sun, 29 Aug 2021 19:57:33 +0000 (20:57 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 31 Aug 2021 10:33:26 +0000 (11:33 +0100)
commite1c21f39cca35df572dd128028f9b9f4e34835f8
treec5960b0af347aade070df929f9de6c2fe624a731
parentcff4ce7a5e0c726e17ad73d24045f52b90d2caf1
sum: always output a file name if one passed

Adjust to output the file name if any name parameter is passed.
This is consistent with sum -s, cksum, and sum implementations
on other platforms.  This should not cause significant compat
issues, as multiple fields are already output, and so already
need to be parsed.

* src/sum.c (bsd_sum_file): Output the file name
if any name parameter is passed.
* tests/misc/sum.pl: Adjust accordingly.
* doc/coreutils.texi (sum invocation): Likewise.
* NEWS: Mention the change in behavior.
NEWS
doc/coreutils.texi
src/sum.c
tests/misc/sum.pl