HomeFreeBSD

md5: Improve compatibility with coreutils and format fix

Description

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

Details

Provenance
seAuthored on Jun 29 2021, 7:01 AM
Parents
rG26a357245f21: arm64: a few simplications to pmap_remove_{all,write}
Branches
Unknown
Tags
Unknown