diff mbox series

[U-Boot,v3,4/8] cmd: efishell: add images command

Message ID 20181218050510.20308-5-takahiro.akashi@linaro.org
State Superseded
Delegated to: Alexander Graf
Headers show
Series cmd: add efishell for efi environment | expand

Commit Message

AKASHI Takahiro Dec. 18, 2018, 5:05 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 ed8de9e0355d..010870df63c8 100644
--- a/cmd/efishell.c
+++ b/cmd/efishell.c
@@ -432,6 +432,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(