luks: Enable LUKSv2 support in the luks command

Allow unlocking a v2 LUKS partition.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-11 03:40:11 -07:00
parent f0d3a7d5f9
commit 407b729bad

View File

@@ -85,10 +85,7 @@ static int do_luks_unlock(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
if (version != LUKS_VERSION_1) {
printf("Only LUKS1 is currently supported\n");
return CMD_RET_FAILURE;
}
printf("Unlocking LUKS%d partition...\n", version);
/* Unlock the partition to get the master key */
ret = luks_unlock(dev_desc->bdev, &info, passphrase, master_key,