diff mbox series

[v5,5/7] cmd: efidebug: add images command

Message ID 20190121074923.29959-6-takahiro.akashi@linaro.org
State New
Headers show
Series cmd: add efidebug for efi environment | expand

Commit Message

AKASHI Takahiro Jan. 21, 2019, 7:49 a.m. UTC
"images" command prints loaded images-related information.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 cmd/efidebug.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 34794398c0c2..906e6b2d0295 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -584,6 +584,14 @@  static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag,
 	return CMD_RET_SUCCESS;
 }
 
+static int do_efi_show_images(cmd_tbl_t *cmdtp, int flag,
+			      int argc, char * const argv[])
+{
+	efi_print_image_infos(NULL);
+
+	return CMD_RET_SUCCESS;
+}
+
 static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
 			   int argc, char * const argv[])
 {
@@ -983,6 +991,8 @@  static cmd_tbl_t cmd_efidebug_sub[] = {
 			 "", ""),
 	U_BOOT_CMD_MKENT(dh, CONFIG_SYS_MAXARGS, 1, do_efi_show_handles,
 			 "", ""),
+	U_BOOT_CMD_MKENT(images, CONFIG_SYS_MAXARGS, 1, do_efi_show_images,
+			 "", ""),
 };
 
 /* Interpreter command to configure UEFI environment */
@@ -1039,7 +1049,9 @@  static char efidebug_help_text[] =
 	"efidebug drivers\n"
 	"  - show uefi drivers\n"
 	"efidebug dh\n"
-	"  - show uefi handles\n";
+	"  - show uefi handles\n"
+	"efidebug images\n"
+	"  - show loaded images\n";
 #endif
 
 U_BOOT_CMD(