aboutsummaryrefslogtreecommitdiff
path: root/net/bootp.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 /net/bootp.c
parent6c6166f52983dac775e3852f9d0f49d033f27108 (diff)
downloadu-boot-b6446b67758ea1e41223f0782924bb73fd0a89d0.zip
u-boot-b6446b67758ea1e41223f0782924bb73fd0a89d0.tar.gz
u-boot-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 'net/bootp.c')
-rw-r--r--net/bootp.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 83465e4..d1cbd39 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -271,17 +271,11 @@ static void BootpVendorProcess (u8 * ext, int size)
#ifdef DEBUG_BOOTP_EXT
puts ("[BOOTP] Received fields: \n");
- if (NetOurSubnetMask) {
- puts ("NetOurSubnetMask : ");
- print_IPaddr (NetOurSubnetMask);
- putc ('\n');
- }
+ if (NetOurSubnetMask)
+ printf ("NetOurSubnetMask : %pI4\n", &NetOurSubnetMask);
- if (NetOurGatewayIP) {
- puts ("NetOurGatewayIP : ");
- print_IPaddr (NetOurGatewayIP);
- putc ('\n');
- }
+ if (NetOurGatewayIP)
+ printf ("NetOurGatewayIP : %pI4", &NetOurGatewayIP);
if (NetBootFileSize) {
printf ("NetBootFileSize : %d\n", NetBootFileSize);
@@ -942,9 +936,7 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
DhcpOptionsProcess((u8 *)&bp->bp_vend[4], bp);
BootpCopyNetParams(bp); /* Store net params from reply */
dhcp_state = BOUND;
- puts ("DHCP client bound to address ");
- print_IPaddr(NetOurIP);
- putc ('\n');
+ printf ("DHCP client bound to address %pI4\n", &NetOurIP);
/* Obey the 'autoload' setting */
if ((s = getenv("autoload")) != NULL) {