]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cksum: support transparent emulation of older utils
authorPádraig Brady <P@draigBrady.com>
Sat, 8 Jul 2023 14:14:12 +0000 (15:14 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 9 Jul 2023 13:33:14 +0000 (14:33 +0100)
commit5e1e0993b50f9828332870829463e975df6abeab
treef105e873442c7646ad48f806e97a70711e30807d
parent2f1cffe07ab0f0b4135a52d95f1689d7fc7f26c9
cksum: support transparent emulation of older utils

Support -b, --binary, and -t, --text
to allow full emulation of older utilities with:
  exec cksum -a $algo --untagged "$@"
Note this would diverge from OpenBSD's support of cksum -b.

* src/digest.c: Change -b to mean --binary, not --base64 in all cases.
Accept -b and -t in all cases.  Keep --binary and --text undocumented
for cksum.
* tests/cksum/cksum-base64.pl: s/-b/--base64/.
* tests/cksum/cksum-a.sh: Ensure cksum supports -b and -t appropriately.
* NEWS: Mention the change in behavior.
NEWS
src/digest.c
tests/cksum/cksum-a.sh
tests/cksum/cksum-base64.pl