mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-17 05:40:13 +01:00
Add compile-in flag to program version output.
Then we can check if tools are compiled with a support for specific extension/library.
This commit is contained in:
@@ -432,3 +432,32 @@ int tools_write_mk(const char *file, const char *key, int keysize)
|
||||
close(fd);
|
||||
return r;
|
||||
}
|
||||
|
||||
void tools_package_version(const char *name, bool use_pwlibs)
|
||||
{
|
||||
log_std("%s %s flags: %s%s\n", name, PACKAGE_VERSION,
|
||||
#ifdef USE_UDEV
|
||||
"UDEV "
|
||||
#endif
|
||||
#ifdef HAVE_BLKID
|
||||
"BLKID "
|
||||
#endif
|
||||
#ifdef KERNEL_KEYRING
|
||||
"KEYRING "
|
||||
#endif
|
||||
#ifdef ENABLE_FIPS
|
||||
"FIPS "
|
||||
#endif
|
||||
#ifdef ENABLE_AF_ALG
|
||||
"KERNEL_CAPI "
|
||||
#endif
|
||||
,
|
||||
#if defined(ENABLE_PWQUALITY)
|
||||
use_pwlibs ? "PWQUALITY " : ""
|
||||
#elif defined(ENABLE_PASSWDQC)
|
||||
use_pwlibs ? "PASSWDQC " : ""
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user