X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=net%2Fbootp.c;h=3dea70aab0b00c72cf0f0b418ccb6ae61c3631dd;hb=7d6900ebe16d679c0e03f8d1584b64057a64ce39;hp=83465e41aa9de081c24c0f9c6a51c2c10e5bd14d;hpb=156feb90d200f186cdfd856d7f6f1878bb1bec1e;p=u-boot diff --git a/net/bootp.c b/net/bootp.c index 83465e41aa..3dea70aab0 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); @@ -579,21 +573,12 @@ BootpRequest (void) #ifdef CONFIG_BOOTP_RANDOM_DELAY /* Random BOOTP delay */ unsigned char bi_enetaddr[6]; int reg; - char *e,*s; - char tmp[64]; ulong tst1, tst2, sum, m_mask, m_value = 0; if (BootpTry ==0) { /* get our mac */ - reg = getenv_r ("ethaddr", tmp, sizeof(tmp)); - s = (reg > 0) ? tmp : NULL; + eth_getenv_enetaddr("ethaddr", bi_enetaddr); - for (reg=0; reg<6; ++reg) { - bi_enetaddr[reg] = s ? simple_strtoul(s, &e, 16) : 0; - if (s) { - s = (*e) ? e+1 : e; - } - } #ifdef DEBUG puts ("BootpRequest => Our Mac: "); for (reg=0; reg<6; reg++) { @@ -942,9 +927,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) {