From: Karel Zak Date: Mon, 13 Jun 2022 10:03:26 +0000 (+0200) Subject: hardlink: print supported feature on --version X-Git-Tag: v2.39-rc1~613 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a2baa1a55d41a399c8d9a8c3ee92f3cf056f3cd;p=thirdparty%2Futil-linux.git hardlink: print supported feature on --version Signed-off-by: Karel Zak --- diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c index b1eefb9e48..0582bbc976 100644 --- a/misc-utils/hardlink.c +++ b/misc-utils/hardlink.c @@ -186,10 +186,10 @@ static struct options { size_t cache_size; } opts = { /* default setting */ -#ifdef __APPLE__ - .method = "memcmp", -#else +#ifdef USE_FILEEQ_CRYPTOAPI .method = "sha256", +#else + .method = "memcmp", #endif .respect_mode = TRUE, .respect_owner = TRUE, @@ -1295,9 +1295,21 @@ static int parse_options(int argc, char *argv[]) case 'h': usage(); case 'V': - print_version(EXIT_SUCCESS); + { + static const char *features[] = { +#ifdef USE_REFLINK + "reflink", +#endif +#ifdef USE_FILEEQ_CRYPTOAPI + "cryptoapi", +#endif + NULL + }; + print_version_with_features(EXIT_SUCCESS, features); + } default: - errtryhelp(EXIT_FAILURE);} + errtryhelp(EXIT_FAILURE); + } } return 0;