diff options
author | Marek Vasut | 2023-04-22 15:01:32 +0200 |
---|---|---|
committer | Tom Rini | 2023-05-03 18:30:46 -0400 |
commit | d8eb4e2c05406dcaad30b36fa2a69a63dff376a4 (patch) | |
tree | e0503f92c389f6f0d4db380127b64c2ad9a94c98 /cmd/bdinfo.c | |
parent | 55922ed5fa03c3ce2ca6c1c504d86dcf2c80c5f7 (diff) |
cmd: bdinfo: Wrap network information printing into print_eth()
Move all the network information printing into print_eth(),
no functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/bdinfo.c')
-rw-r--r-- | cmd/bdinfo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 78cb41f0760..71a122466b0 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -52,7 +52,10 @@ static void print_eth(int idx) val = env_get(name); if (!val) val = "(not set)"; + + printf("current eth = %s\n", eth_get_name()); printf("%-12s= %s\n", name, val); + printf("IP addr = %s\n", env_get("ipaddr")); } void bdinfo_print_mhz(const char *name, unsigned long hz) @@ -124,11 +127,8 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) 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)) { - printf("current eth = %s\n", eth_get_name()); + if (IS_ENABLED(CONFIG_CMD_NET)) print_eth(0); - printf("IP addr = %s\n", env_get("ipaddr")); - } 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)); bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size); |