mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Introduce LUKS2-OPAL private dm uuid prefix.
LUKS2 devices with configured HW OPAL encryption (any configuration) get activated with private dm uuid prefix LUKS2-OPAL so that we can properly detect devices with HW OPAL encryption even with missing LUKS2 header (detached header). Internally LUKS2-OPAL prefix matches LUKS2 device type.
This commit is contained in:
@@ -2754,9 +2754,13 @@ int LUKS2_activate(struct crypt_device *cd,
|
||||
if (dynamic)
|
||||
dmd.segment.size = dmdi.segment.size;
|
||||
|
||||
r = create_or_reload_device_with_integrity(cd, name, CRYPT_LUKS2, &dmd, &dmdi);
|
||||
r = create_or_reload_device_with_integrity(cd, name,
|
||||
opal_key ? CRYPT_LUKS2_HW_OPAL : CRYPT_LUKS2,
|
||||
&dmd, &dmdi);
|
||||
} else
|
||||
r = create_or_reload_device(cd, name, CRYPT_LUKS2, &dmd);
|
||||
r = create_or_reload_device(cd, name,
|
||||
opal_key ? CRYPT_LUKS2_HW_OPAL : CRYPT_LUKS2,
|
||||
&dmd);
|
||||
|
||||
dm_targets_free(cd, &dmd);
|
||||
dm_targets_free(cd, &dmdi);
|
||||
|
||||
Reference in New Issue
Block a user