freebsd-nq/sbin/md5
Stefan Eßer b33d1898c1 md5: Improve compatibility with coreutils and format fix
The previous changes that added support for the coreutils -c option
modified the output generated by passing -r to match that of the
coreutils versions. The difference is that coreutils separates the
hash from the file name by two blanks "  " (or a blank followed by
an asterisk " *" with the -b option denoting).

While most scripts or users will not notice the difference, it might
be considered a violation of POLA and this commit reverts the change
for the non-sum programs. These will print a single blank " " as the
separator, as they die before the previous commit.

In order to still generate output that is identical to that of the
coreutils programs, this commit generates the "  " or " *" separator
used by them for the -sum versions, depending on the presence of the
-b option.

MFC after:	3 days
2021-06-29 09:21:57 +02:00
..
tests sbin/md5: fix test case to not write outside temp directory 2021-06-25 10:37:51 +02:00
Makefile sbin/md5: re-enable tests 2021-06-25 12:41:14 +02:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
md5.1 md5: Improve compatibility with coreutils and format fix 2021-06-29 09:21:57 +02:00
md5.c md5: Improve compatibility with coreutils and format fix 2021-06-29 09:21:57 +02:00