busybox/coreutils
Martin Storsjö 993d416d02 md5/sha1sum: Honor the -b flag in the output
The output of md5sum/sha1sum contains a character to indicate
what mode was used to read the file - '*' for binary, and ' '
for text or where binary is insignificant.

This flag character makes a difference for the ffmpeg testsuite.
This testsuite contains a number of reference files (e.g. [1]),
containing the expected md5sum output for those files, which is
checked verbatim.

By making busybox's md5sum honor this flag in the output,
ffmpeg's testsuite can run successfully on top of busybox.

The flag is only partially implemented; in coreutils md5sum,
a later "-t" option overrides an earlier "-b" option. Here,
just check if a "-b" option was specified or not. Neither
flag affects how the files actually are read.

[1] 894da5ca7d/tests/ref/acodec/flac

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2026-01-18 03:09:52 +01:00
..
libcoreutils whitespace and comment format fixes, no code changes 2017-10-05 15:19:25 +02:00
basename.c Update applet size estimates 2023-07-10 17:25:21 +02:00
cat.c Update applet size estimates 2023-07-10 17:25:21 +02:00
chgrp.c *: --help tweaks 2021-06-14 20:47:20 +02:00
chmod.c libbb: eliminate a static data array in bb_mode_string() 2021-09-17 01:18:31 +02:00
chown.c *: --help tweaks 2021-06-14 20:47:20 +02:00
chroot.c Update applet size estimates 2023-07-10 17:25:21 +02:00
cksum.c introduce and use exitcode_t 2023-07-17 17:29:36 +02:00
comm.c Update applet size estimates 2023-07-10 17:25:21 +02:00
Config.src config system: move some options closer to relevalnt tool subdirectories 2021-10-12 13:23:29 +02:00
cp.c cp: fix cp -aT overwriting symlink to directories 2025-10-07 10:05:08 +02:00
cut.c cut: code shrink 2024-12-21 00:43:45 +01:00
date.c date: return failure exit code on clock_settime error 2025-07-30 19:44:39 +02:00
dd.c dd: fix overflow for very large count/seek/skip values 2025-11-08 07:42:34 +01:00
df.c df: -k overrides block size to 1k even if $POSIXLY_CORRECT 2025-07-01 19:26:50 +02:00
dirname.c Update applet size estimates 2023-07-10 17:25:21 +02:00
dos2unix.c Update applet size estimates 2023-07-10 17:25:21 +02:00
du.c Update applet size estimates 2023-07-10 17:25:21 +02:00
echo.c Update applet size estimates 2023-07-10 17:25:21 +02:00
env.c Update applet size estimates 2023-07-10 17:25:21 +02:00
expand.c introduce and use exitcode_t 2023-07-17 17:29:36 +02:00
expr.c Update applet size estimates 2023-07-10 17:25:21 +02:00
factor.c Update applet size estimates 2023-07-10 17:25:21 +02:00
false.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fold.c introduce and use exitcode_t 2023-07-17 17:29:36 +02:00
head.c Update applet size estimates 2023-07-10 17:25:21 +02:00
hostid.c Update applet size estimates 2023-07-10 17:25:21 +02:00
id.c Update applet size estimates 2023-07-10 17:25:21 +02:00
id_test.sh coreutils: fixes for coreutils/id_test.sh script 2026-01-18 01:37:53 +01:00
install.c install: Fix chown resetting suid/sgid bits from chmod 2023-10-02 14:26:27 +02:00
Kbuild.src shells: make hush test optional, rename ASH_BUILTIN_foo -> ASH_foo 2017-01-10 15:13:30 +01:00
link.c Update applet size estimates 2023-07-10 17:25:21 +02:00
ln.c introduce and use exitcode_t 2023-07-17 17:29:36 +02:00
logname.c Update applet size estimates 2023-07-10 17:25:21 +02:00
ls.c ls: restore functionality of --color 2025-11-08 07:42:34 +01:00
md5_sha1_sum.c md5/sha1sum: Honor the -b flag in the output 2026-01-18 03:09:52 +01:00
mkdir.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mkfifo.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mknod.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mktemp.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mv.c mv: fix error in !VERBOSE configs 2023-01-02 17:04:44 +01:00
nice.c Update applet size estimates 2023-07-10 17:25:21 +02:00
nl.c Update applet size estimates 2023-07-10 17:25:21 +02:00
nohup.c Update applet size estimates 2023-07-10 17:25:21 +02:00
nproc.c libbb: add bit counting function, use where appropriate 2024-05-31 16:03:23 +02:00
od.c od: -l,I,L indeed depend on sizeof(long), fix this 2023-05-26 20:17:04 +02:00
od_bloaty.c od: -l,I,L indeed depend on sizeof(long), fix this 2023-05-26 20:17:04 +02:00
paste.c Update applet size estimates 2023-07-10 17:25:21 +02:00
printenv.c Update applet size estimates 2023-07-10 17:25:21 +02:00
printf.c sleep: fix "sleep -- ARGS" 2023-10-02 13:56:32 +02:00
pwd.c Update applet size estimates 2023-07-10 17:25:21 +02:00
readlink.c Update applet size estimates 2023-07-10 17:25:21 +02:00
realpath.c Update applet size estimates 2023-07-10 17:25:21 +02:00
rm.c Update applet size estimates 2023-07-10 17:25:21 +02:00
rmdir.c Update applet size estimates 2023-07-10 17:25:21 +02:00
seq.c Update applet size estimates 2023-07-10 17:25:21 +02:00
shred.c Update applet size estimates 2023-07-10 17:25:21 +02:00
shuf.c Update applet size estimates 2023-07-10 17:25:21 +02:00
sleep.c sleep: Update doc 2023-11-07 16:59:09 +01:00
sort.c Update applet size estimates 2023-07-10 17:25:21 +02:00
split.c Update applet size estimates 2023-07-10 17:25:21 +02:00
stat.c libbb: eliminate a static data array in bb_mode_string() 2021-09-17 01:18:31 +02:00
stty.c Update applet size estimates 2023-07-10 17:25:21 +02:00
sum.c Update applet size estimates 2023-07-10 17:25:21 +02:00
sync.c Update applet size estimates 2023-07-10 17:25:21 +02:00
tac.c Update applet size estimates 2023-07-10 17:25:21 +02:00
tail.c Update applet size estimates 2023-07-10 17:25:21 +02:00
tee.c Update applet size estimates 2023-07-10 17:25:21 +02:00
test.c test: -x can return 0/1 early if all X bits are the same 2024-10-07 07:33:58 +02:00
test_ptr_hack.c *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
timeout.c timeout: allow fractional seconds in timeout values 2024-07-13 21:34:18 +02:00
touch.c introduce and use exitcode_t 2023-07-17 17:29:36 +02:00
tr.c Update applet size estimates 2023-07-10 17:25:21 +02:00
true.c Update applet size estimates 2023-07-10 17:25:21 +02:00
truncate.c Update applet size estimates 2023-07-10 17:25:21 +02:00
tsort.c tsort: avoid use-after-free 2023-08-31 09:41:53 +02:00
tty.c Update applet size estimates 2023-07-10 17:25:21 +02:00
uname.c Update applet size estimates 2023-07-10 17:25:21 +02:00
uniq.c Update applet size estimates 2023-07-10 17:25:21 +02:00
unlink.c Update applet size estimates 2023-07-10 17:25:21 +02:00
usleep.c Update applet size estimates 2023-07-10 17:25:21 +02:00
uudecode.c Update applet size estimates 2023-07-10 17:25:21 +02:00
uuencode.c Update applet size estimates 2023-07-10 17:25:21 +02:00
wc.c Update applet size estimates 2023-07-10 17:25:21 +02:00
who.c Update applet size estimates 2023-07-10 17:25:21 +02:00
whoami.c Update applet size estimates 2023-07-10 17:25:21 +02:00
yes.c Update applet size estimates 2023-07-10 17:25:21 +02:00