Change #254559
| Category | gcoreutils |
| Changed by | Pádraig Brady <P@draigBrady.com> |
| Changed at | Thu 08 Jan 2026 17:14:57 |
| Repository | git://git.savannah.gnu.org/coreutils.git |
| Project | gcoreutils |
| Branch | master |
| Revision | 9200747f65e3523f7b48184a331eec5a1225b435 |
Comments
cksum: validate options more consistently We disallow `cksum --tag --check` which is fine, but the error should be consistent with md5sum, and less confusing, as it currently mentions "--binary" and "--text" which weren't specified. We disallow `cksum --tag --text` which is fine, but we should also disallow `cksum --text --tag`. We should honor an explicit --binary (output *) with this combination of options: cksum --binary --tag --untagged -a md5 /dev/null Note this also makes both of `cksum -a md5` and `cksum --tag -a md5` consistently use binary mode when reading from a tty on systems like MinGW where O_BINARY is set. * src/cksum.c (main): Adjust --text,--binary and --tag,--untagged option processing. * tests/cksum/cksum-a.sh: Add test cases. * tests/cksum/cksum-c.sh: Likewise. * NEWS: Mention the improvement. Fixes https://github.com/coreutils/coreutils/issues/163
Changed files
- NEWS
- src/cksum.c
- tests/cksum/cksum-a.sh
- tests/cksum/cksum-c.sh