diff mbox series

[U-Boot,v6,6/7] cmd: efidebug: add images command

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

Commit Message

takahiro.akashi@linaro.org Jan. 24, 2019, 11:04 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(-)

Comments

Alexander Graf Jan. 29, 2019, 3:35 p.m. UTC | #1
On 01/24/2019 12:04 PM, AKASHI Takahiro wrote:
> "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 --git a/cmd/efidebug.c b/cmd/efidebug.c
> index a1852e8ea4b9..81ab3654f746 100644
> --- a/cmd/efidebug.c
> +++ b/cmd/efidebug.c
> @@ -301,6 +301,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);

Where does this function get defined?


Alex
takahiro.akashi@linaro.org Jan. 30, 2019, midnight UTC | #2
On Tue, Jan 29, 2019 at 04:35:32PM +0100, Alexander Graf wrote:
> On 01/24/2019 12:04 PM, AKASHI Takahiro wrote:
> >"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 --git a/cmd/efidebug.c b/cmd/efidebug.c
> >index a1852e8ea4b9..81ab3654f746 100644
> >--- a/cmd/efidebug.c
> >+++ b/cmd/efidebug.c
> >@@ -301,6 +301,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);
> 
> Where does this function get defined?

in efi_image_loader.c by Heinrich.

-Takahiro Akashi

> 
> Alex
>
Heinrich Schuchardt Feb. 19, 2019, 7:51 p.m. UTC | #3
On 1/24/19 12:04 PM, AKASHI Takahiro wrote:
> "images" command prints loaded images-related information.
> 
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>  cmd/efidebug.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/cmd/efidebug.c b/cmd/efidebug.c
> index a1852e8ea4b9..81ab3654f746 100644
> --- a/cmd/efidebug.c
> +++ b/cmd/efidebug.c
> @@ -301,6 +301,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[])
>  {
> @@ -698,6 +706,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 */
> @@ -749,7 +759,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(
>
diff mbox series

Patch

diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index a1852e8ea4b9..81ab3654f746 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -301,6 +301,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[])
 {
@@ -698,6 +706,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 */
@@ -749,7 +759,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(