summaryrefslogtreecommitdiff
path: root/common/cmd_bdinfo.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-17 00:00:53 -0500
committerWolfgang Denk <wd@denx.de>2009-03-20 22:39:09 +0100
commitb6446b67758ea1e41223f0782924bb73fd0a89d0 (patch)
tree6d96ce0bb34d3be4f09de423721095c1c6b8b1aa /common/cmd_bdinfo.c
parent6c6166f52983dac775e3852f9d0f49d033f27108 (diff)
downloadu-boot-imx-b6446b67758ea1e41223f0782924bb73fd0a89d0.zip
u-boot-imx-b6446b67758ea1e41223f0782924bb73fd0a89d0.tar.gz
u-boot-imx-b6446b67758ea1e41223f0782924bb73fd0a89d0.tar.bz2
convert print_IPaddr() to %pI4
Now that our printf functions support the %pI4 modifier like the kernel, let's drop the inflexible print_IPaddr() function and covert over to the %pI4 modifier. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'common/cmd_bdinfo.c')
-rw-r--r--common/cmd_bdinfo.c48
1 files changed, 19 insertions, 29 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index b2d6f84..6af5749 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -26,7 +26,6 @@
*/
#include <common.h>
#include <command.h>
-#include <net.h> /* for print_IPaddr */
DECLARE_GLOBAL_DATA_PTR;
@@ -134,8 +133,8 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#ifdef CONFIG_HERMES
print_str ("ethspeed", strmhz(buf, bd->bi_ethspeed));
#endif
- puts ("\nIP addr = "); print_IPaddr (bd->bi_ip_addr);
- printf ("\nbaudrate = %6ld bps\n", bd->bi_baudrate );
+ printf ("IP addr = %pI4\n", &bd->bi_ip_addr);
+ printf ("baudrate = %6ld bps\n", bd->bi_baudrate );
return 0;
}
@@ -156,9 +155,8 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
- puts ("\nip_addr = ");
- print_IPaddr (bd->bi_ip_addr);
- printf ("\nbaudrate = %ld bps\n", bd->bi_baudrate);
+ printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf ("baudrate = %ld bps\n", bd->bi_baudrate);
return 0;
}
@@ -188,11 +186,10 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
- puts ("\nip_addr = ");
- print_IPaddr (bd->bi_ip_addr);
+ printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
#endif
- printf ("\nbaudrate = %ld bps\n", bd->bi_baudrate);
+ printf ("baudrate = %ld bps\n", bd->bi_baudrate);
return 0;
}
@@ -216,10 +213,9 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
- puts ("\nip_addr = ");
- print_IPaddr (bd->bi_ip_addr);
+ printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
#endif
- printf ("\nbaudrate = %ld bps\n", (ulong)bd->bi_baudrate);
+ printf ("baudrate = %ld bps\n", (ulong)bd->bi_baudrate);
return 0;
}
@@ -255,10 +251,9 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
for (i = 0; i < 6; ++i) {
printf("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
- puts("\nIP addr = ");
- print_IPaddr(bd->bi_ip_addr);
+ printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
#endif
- printf("\nbaudrate = %6ld bps\n", bd->bi_baudrate);
+ printf("baudrate = %6ld bps\n", bd->bi_baudrate);
return 0;
}
@@ -320,10 +315,9 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
#endif
- puts ("\nip_addr = ");
- print_IPaddr (bd->bi_ip_addr);
+ printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
#endif
- printf ("\nbaudrate = %ld bps\n", bd->bi_baudrate);
+ printf ("baudrate = %ld bps\n", bd->bi_baudrate);
return 0;
}
@@ -354,9 +348,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts("ethaddr =");
for (i = 0; i < 6; ++i)
printf("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
- puts("\nip_addr = ");
- print_IPaddr(bd->bi_ip_addr);
- printf("\nbaudrate = %d bps\n", bd->bi_baudrate);
+ printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
}
@@ -379,9 +372,8 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
- puts ("\nip_addr = ");
- print_IPaddr (bd->bi_ip_addr);
- printf ("\nbaudrate = %d bps\n", bd->bi_baudrate);
+ printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf ("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
}
@@ -409,12 +401,10 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
- puts ( "\n"
- "ip_addr = ");
- print_IPaddr (bd->bi_ip_addr);
+ puts ( "\n" );
+ printf ("ip_addr = %pI4\n", &bd->bi_ip_addr);
#endif
- printf ("\n"
- "baudrate = %d bps\n", bd->bi_baudrate);
+ printf ("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
}