Restrict --active-name to LUKS2 type only.

This commit is contained in:
Ondrej Kozina
2022-03-18 13:32:54 +01:00
committed by Milan Broz
parent a2f30ebd4c
commit a55b0530a4

View File

@@ -2784,6 +2784,9 @@ static const char *verify_reencrypt(void)
if (ARG_SET(OPT_REDUCE_DEVICE_SIZE_ID) && ARG_SET(OPT_DEVICE_SIZE_ID))
return _("Options --reduce-device-size and --data-size cannot be combined.");
if (isLUKS1(luksType(device_type)) && ARG_SET(OPT_ACTIVE_NAME_ID))
return _("Option --active-name can be set only for LUKS2 device.");
return NULL;
}