From: Marek Vasut Date: Sat, 7 Oct 2023 21:41:00 +0000 (+0200) Subject: cmd: bdinfo: Implement support for printing ethernet settings via bdinfo -e X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24style.Permalink%20%7D%7D?a=commitdiff_plain;h=ea9637c92f3b698903ee3d76f0b57e1109b352b0;p=u-boot.git cmd: bdinfo: Implement support for printing ethernet settings via bdinfo -e Add support for printing ethernet settings only via 'bdinfo -e' . Reviewed-by: Simon Glass Signed-off-by: Marek Vasut --- diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index c720ee6f9b..79106caeec 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -193,10 +193,15 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return bdinfo_print_all(bd); getopt_init_state(&gs); - while ((opt = getopt(&gs, argc, argv, "am")) > 0) { + while ((opt = getopt(&gs, argc, argv, "aem")) > 0) { switch (opt) { case 'a': return bdinfo_print_all(bd); + case 'e': + if (!IS_ENABLED(CONFIG_CMD_NET)) + return CMD_RET_USAGE; + print_eth(); + return CMD_RET_SUCCESS; case 'm': print_bi_dram(bd); return CMD_RET_SUCCESS;