mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
Add crypt_dump_json() API call.
Add API call that can directly print JSON metadata area from LUKS2 device. For commandline it also adds --dump-json-metadata option for luksDump action. Note that the binary metadata (UUID, version etc) is not part of this output. (We reserve flags parameter to be able to add this later.) Fixes: #511
This commit is contained in:
@@ -2194,6 +2194,8 @@ static int action_luksDump(void)
|
||||
r = luksDump_with_volume_key(cd);
|
||||
else if (ARG_SET(OPT_UNBOUND_ID))
|
||||
r = luksDump_with_unbound_key(cd);
|
||||
else if (ARG_SET(OPT_DUMP_JSON_ID))
|
||||
r = crypt_dump_json(cd, NULL, 0);
|
||||
else
|
||||
r = crypt_dump(cd);
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user