diff mbox series

[11/15] cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y

Message ID c5bfc875954340d5dffb57c6bce0b4a9a99f6051.1716393035.git.jerome.forissier@linaro.org
State Superseded
Headers show
Series Introduce the lwIP network stack | expand

Commit Message

Jerome Forissier May 22, 2024, 4 p.m. UTC
Support "bdinfo -e" when lwIP is selected.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
---
 cmd/bdinfo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Ilias Apalodimas May 22, 2024, 4:06 p.m. UTC | #1
On Wed, 22 May 2024 at 19:04, Jerome Forissier
<jerome.forissier@linaro.org> wrote:
>
> Support "bdinfo -e" when lwIP is selected.
>
> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
> ---
>  cmd/bdinfo.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
> index 79106caeec..690fb894bf 100644
> --- a/cmd/bdinfo.c
> +++ b/cmd/bdinfo.c
> @@ -152,7 +152,7 @@ static int bdinfo_print_all(struct bd_info *bd)
>         bdinfo_print_num_l("relocaddr", gd->relocaddr);
>         bdinfo_print_num_l("reloc off", gd->reloc_off);
>         printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8);
> -       if (IS_ENABLED(CONFIG_CMD_NET))
> +       if (IS_ENABLED(CONFIG_CMD_NET) || IS_ENABLED(CONFIG_CMD_NET_LWIP))
>                 print_eth();
>         bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob));
>         bdinfo_print_num_l("new_fdt", (ulong)map_to_sysmem(gd->new_fdt));
> @@ -198,7 +198,8 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
>                 case 'a':
>                         return bdinfo_print_all(bd);
>                 case 'e':
> -                       if (!IS_ENABLED(CONFIG_CMD_NET))
> +                       if (!IS_ENABLED(CONFIG_CMD_NET) &&
> +                           !IS_ENABLED(CONFIG_CMD_NET_LWIP))
>                                 return CMD_RET_USAGE;
>                         print_eth();
>                         return CMD_RET_SUCCESS;
> --
> 2.40.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini May 23, 2024, 3:05 p.m. UTC | #2
On Wed, May 22, 2024 at 06:00:11PM +0200, Jerome Forissier wrote:

> Support "bdinfo -e" when lwIP is selected.
> 
> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 79106caeec..690fb894bf 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -152,7 +152,7 @@  static int bdinfo_print_all(struct bd_info *bd)
 	bdinfo_print_num_l("relocaddr", gd->relocaddr);
 	bdinfo_print_num_l("reloc off", gd->reloc_off);
 	printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8);
-	if (IS_ENABLED(CONFIG_CMD_NET))
+	if (IS_ENABLED(CONFIG_CMD_NET) || IS_ENABLED(CONFIG_CMD_NET_LWIP))
 		print_eth();
 	bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob));
 	bdinfo_print_num_l("new_fdt", (ulong)map_to_sysmem(gd->new_fdt));
@@ -198,7 +198,8 @@  int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 		case 'a':
 			return bdinfo_print_all(bd);
 		case 'e':
-			if (!IS_ENABLED(CONFIG_CMD_NET))
+			if (!IS_ENABLED(CONFIG_CMD_NET) &&
+			    !IS_ENABLED(CONFIG_CMD_NET_LWIP))
 				return CMD_RET_USAGE;
 			print_eth();
 			return CMD_RET_SUCCESS;