[Concept,14/15] luks: Enable LUKSv2 support in the luks command

Message ID 20251111124131.1198930-15-sjg@u-boot.org
State New
Headers
Series luks: Provide support for LUKSv2 |

Commit Message

Simon Glass Nov. 11, 2025, 12:41 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Allow unlocking a v2 LUKS partition.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 cmd/luks.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
  

Patch

diff --git a/cmd/luks.c b/cmd/luks.c
index 19f909be96b..c1e8035e685 100644
--- a/cmd/luks.c
+++ b/cmd/luks.c
@@ -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,