diff mbox series

[v2,07/14] cmd: efishell: add images command

Message ID 20181105090653.7409-8-takahiro.akashi@linaro.org
State Superseded
Headers show
Series efi: make efi and bootmgr more usable | expand

Commit Message

AKASHI Takahiro Nov. 5, 2018, 9:06 a.m. UTC
"images" command prints loaded images-related information.

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

Patch

diff --git a/cmd/efishell.c b/cmd/efishell.c
index 2f54f7803ac5..b5050d63fa22 100644
--- a/cmd/efishell.c
+++ b/cmd/efishell.c
@@ -435,6 +435,13 @@  static int do_efi_show_drivers(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
+static int do_efi_show_images(int argc, char * const argv[])
+{
+	efi_print_image_infos(NULL);
+
+	return CMD_RET_SUCCESS;
+}
+
 static int do_efi_boot_add(int argc, char * const argv[])
 {
 	int id;
@@ -817,6 +824,8 @@  static int do_efishell(cmd_tbl_t *cmdtp, int flag,
 		return do_efi_show_devices(argc, argv);
 	else if (!strcmp(command, "drivers"))
 		return do_efi_show_drivers(argc, argv);
+	else if (!strcmp(command, "images"))
+		return do_efi_show_images(argc, argv);
 	else
 		return CMD_RET_USAGE;
 }
@@ -842,7 +851,9 @@  static char efishell_help_text[] =
 	"efishell devices\n"
 	"  - show uefi devices\n"
 	"efishell drivers\n"
-	"  - show uefi drivers\n";
+	"  - show uefi drivers\n"
+	"efishell images\n"
+	"  - show loaded images\n";
 #endif
 
 U_BOOT_CMD(