mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-19 06:40:08 +01:00
Fail early if OPAL is selected with LUKS1.
This commit is contained in:
@@ -1468,6 +1468,11 @@ int luksFormat(struct crypt_device **r_cd, char **r_password, size_t *r_password
|
|||||||
log_err(_("Unsupported LUKS2 metadata size options."));
|
log_err(_("Unsupported LUKS2 metadata size options."));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ARG_SET(OPT_HW_OPAL_ID) || ARG_SET(OPT_HW_OPAL_ONLY_ID)) {
|
||||||
|
log_err(_("OPAL is supported only for LUKS2 format."));
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user