cryptsetup: add --hw-opal and --hw-opal-only

Signed-off-by: Luca Boccassi <bluca@debian.org>
Co-authored-by: Ondrej Kozina <okozina@redhat.com>
This commit is contained in:
Luca Boccassi
2022-11-28 02:36:05 +00:00
parent b9cc0129c9
commit 446ad76011
4 changed files with 37 additions and 2 deletions

View File

@@ -50,7 +50,8 @@ bool isLUKS1(const char *type)
bool isLUKS2(const char *type)
{
return type && !strcmp(type, CRYPT_LUKS2);
/* OPAL just changes the driver, header format is identical, so overload */
return type && (!strcmp(type, CRYPT_LUKS2));
}
int verify_passphrase(int def)