]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sbin/md5: improve compatibility with coreutils -c option
authorStefan Eßer <se@FreeBSD.org>
Sat, 19 Jun 2021 11:27:16 +0000 (13:27 +0200)
committerStefan Eßer <se@FreeBSD.org>
Mon, 28 Jun 2021 16:13:09 +0000 (18:13 +0200)
commit40484600782fb3df037cbaaa5e1c41afe200c257
tree344f0bd378a67b5f8f9c874565be85b914d69d3e
parent9ecf4bd8e90470d4e282106225a5fbb05a538c2a
sbin/md5: improve compatibility with coreutils -c option

The -c option expects a digest file in either BSD or coreutils format.

The output for matched and mismatched files is identical to that
of the coreutils version.

The review of these changes included test cases that have already
been committed for the functionality that existed before.
Another test script is added to cover the coreutils compatible
extension implemented by this patch.

This commit contains a tests/Makefile that has been cleaned up
compared to the review version, using an implicit rule to apply the
TESTBASE path at build time (and the scripts have been renamed to
have an extension of .SH instead of .sh to trigger this rule).

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D30812

(cherry picked from commit 84f35b6f86efd004a8f25ef6eecea0f5d02733c4)
(cherry picked from commit c2870e576bd20872ed227375a862e0330ef90ad8)
sbin/md5/md5.1
sbin/md5/md5.c
sbin/md5/tests/Makefile
sbin/md5/tests/coreutils-c-test.SH [new file with mode: 0644]