[U-Boot] [PATCH v2 3/3] cmd_bdinfo.c: fix do_bdinfo() for AVR32

Andreas Bießmann biessmann at corscience.de
Wed Nov 3 10:14:51 CET 2010


There was a prototype change from do_bdinfo(.. char *) to do_bdinfo(.. char *
const). This patch respect this change for AVR32 architecture.

Additionally remove network information from printout if not available.

Signed-off-by: Andreas Bießmann <biessmann at corscience.de>
---
changes since v1:
 - add conditional print of network information

 common/cmd_bdinfo.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index ed7a362..8a7483a 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -304,7 +304,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_AVR32)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -315,8 +315,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);
 
+#if defined(CONFIG_CMD_NET)
 	print_eth(0);
 	printf("ip_addr     = %pI4\n", &bd->bi_ip_addr);
+#endif
 	printf("baudrate    = %lu bps\n", bd->bi_baudrate);
 
 	return 0;
-- 
1.7.2.3



More information about the U-Boot mailing list