]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: report optional features in version string
authorDarrick J. Wong <djwong@kernel.org>
Mon, 28 Feb 2022 21:47:43 +0000 (16:47 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 28 Feb 2022 21:47:43 +0000 (16:47 -0500)
commit1e7212c84e9f403ac9232a2e465d0d3703026075
treed81c8822dd6dac9811e948015d955ca6eb951ac2
parent1c08f0ae28b34d97b0a89c8483ef3c743914e85e
xfs_scrub: report optional features in version string

Ted Ts'o reported brittleness in the fstests logic in generic/45[34] to
detect whether or not xfs_scrub is capable of detecting Unicode mischief
in directory and xattr names.  This is a compile-time feature, since we
do not assume that all distros will want to ship xfsprogs with libicu.

Rather than relying on ldd tests (which don't work at all if xfs_scrub
is compiled statically), let's have -V print whether or not the feature
is built into the tool.  Phase 5 still requires the presence of "UTF-8"
in LC_MESSAGES to enable Unicode confusable detection; this merely makes
the feature easier to discover.

Reported-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/xfs_scrub.c