From 16c35d155ab73ba11070a03020c68d842b2c30fb Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Sat, 21 May 2022 21:29:15 +0200 Subject: [PATCH] Fix error message for LUKS2 only cryptsetup commands. Some cryptsetup commands requires LUKS2 device, but message "not a LUKS device" is printed. Just change it to LUKS2. Fixes: #741 --- src/cryptsetup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cryptsetup.c b/src/cryptsetup.c index d040d212..74663225 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -1688,7 +1688,7 @@ static int luksAddUnboundKey(void) goto out; if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) { - log_err(_("Device %s is not a valid LUKS device."), + log_err(_("Device %s is not a valid LUKS2 device."), uuid_or_device_header(NULL)); goto out; } @@ -1922,7 +1922,7 @@ static int action_luksConvertKey(void) goto out; if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) { - log_err(_("Device %s is not a valid LUKS device."), + log_err(_("Device %s is not a valid LUKS2 device."), uuid_or_device_header(NULL)); goto out; } @@ -2502,7 +2502,7 @@ static int action_luksConfig(void) return r; if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) { - log_err(_("Device %s is not a valid LUKS device."), + log_err(_("Device %s is not a valid LUKS2 device."), uuid_or_device_header(NULL)); goto out; } @@ -2646,7 +2646,7 @@ static int action_token(void) return r; if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) { - log_err(_("Device %s is not a valid LUKS device."), + log_err(_("Device %s is not a valid LUKS2 device."), uuid_or_device(ARG_STR(OPT_HEADER_ID) ?: action_argv[1])); crypt_free(cd); return r;