[U-Boot] [PATCH v4 6/9] cmd: efitool: add images command

AKASHI Takahiro takahiro.akashi at linaro.org
Tue Jan 15 02:55:19 UTC 2019


"images" command prints loaded images-related information.

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

diff --git a/cmd/efitool.c b/cmd/efitool.c
index 4bd6367b4bd9..e77273fc6e1e 100644
--- a/cmd/efitool.c
+++ b/cmd/efitool.c
@@ -533,6 +533,13 @@ static int do_efi_show_handles(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;
@@ -946,6 +953,8 @@ static int do_efitool(cmd_tbl_t *cmdtp, int flag,
 		return do_efi_show_drivers(argc, argv);
 	else if (!strcmp(command, "dh"))
 		return do_efi_show_handles(argc, argv);
+	else if (!strcmp(command, "images"))
+		return do_efi_show_images(argc, argv);
 	else
 		return CMD_RET_USAGE;
 }
@@ -976,7 +985,9 @@ static char efitool_help_text[] =
 	"efitool drivers\n"
 	"  - show uefi drivers\n"
 	"efitool dh\n"
-	"  - show uefi handles\n";
+	"  - show uefi handles\n"
+	"efitool images\n"
+	"  - show loaded images\n";
 #endif
 
 U_BOOT_CMD(
-- 
2.19.1



More information about the U-Boot mailing list