[U-Boot] [PATCH] bdinfo: Don't print IP or MAC addresses on boards without network support
Stefan Roese
sr at denx.de
Wed Dec 23 06:56:43 CET 2009
Signed-off-by: Stefan Roese <sr at denx.de>
---
common/cmd_bdinfo.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 11c1547..03ed594 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -93,6 +93,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_str ("pevfreq", strmhz(buf, bd->bi_pevfreq));
#endif
+#ifdef CONFIG_CMD_NET
print_eth(0);
#if defined(CONFIG_HAS_ETH1)
print_eth(1);
@@ -114,6 +115,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_str ("ethspeed", strmhz(buf, bd->bi_ethspeed));
#endif
printf ("IP addr = %pI4\n", &bd->bi_ip_addr);
+#endif /* CONFIG_CMD_NET */
printf ("baudrate = %6ld bps\n", bd->bi_baudrate );
return 0;
}
@@ -130,8 +132,10 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_num ("flashsize", (ulong)bd->bi_flashsize);
print_num ("flashoffset", (ulong)bd->bi_flashoffset);
+#ifdef CONFIG_CMD_NET
print_eth(0);
printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
+#endif
printf ("baudrate = %ld bps\n", bd->bi_baudrate);
return 0;
@@ -288,8 +292,10 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_num("flashsize", (ulong)bd->bi_flashsize);
print_num("flashoffset", (ulong)bd->bi_flashoffset);
+#ifdef CONFIG_CMD_NET
print_eth(0);
printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+#endif
printf("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
@@ -308,8 +314,10 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_num ("flashsize", (ulong)bd->bi_flashsize);
print_num ("flashoffset", (ulong)bd->bi_flashoffset);
+#ifdef CONFIG_CMD_NET
print_eth(0);
printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
+#endif
printf ("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
--
1.6.6.rc4
More information about the U-Boot
mailing list