mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 21:29:59 +01:00
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
This commit is contained in:
@@ -1688,7 +1688,7 @@ static int luksAddUnboundKey(void)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) {
|
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));
|
uuid_or_device_header(NULL));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -1922,7 +1922,7 @@ static int action_luksConvertKey(void)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) {
|
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));
|
uuid_or_device_header(NULL));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -2502,7 +2502,7 @@ static int action_luksConfig(void)
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) {
|
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));
|
uuid_or_device_header(NULL));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -2646,7 +2646,7 @@ static int action_token(void)
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
if ((r = crypt_load(cd, CRYPT_LUKS2, NULL))) {
|
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]));
|
uuid_or_device(ARG_STR(OPT_HEADER_ID) ?: action_argv[1]));
|
||||||
crypt_free(cd);
|
crypt_free(cd);
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user