mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
6c6166f529
commit
b6446b6775
6 changed files with 33 additions and 69 deletions
10
net/tftp.c
10
net/tftp.c
|
@ -508,18 +508,16 @@ TftpStart (void)
|
|||
#if defined(CONFIG_NET_MULTI)
|
||||
printf ("Using %s device\n", eth_get_name());
|
||||
#endif
|
||||
puts ("TFTP from server "); print_IPaddr (TftpServerIP);
|
||||
puts ("; our IP address is "); print_IPaddr (NetOurIP);
|
||||
printf("TFTP from server %pI4"
|
||||
"; our IP address is %pI4", &TftpServerIP, &NetOurIP);
|
||||
|
||||
/* Check if we need to send across this subnet */
|
||||
if (NetOurGatewayIP && NetOurSubnetMask) {
|
||||
IPaddr_t OurNet = NetOurIP & NetOurSubnetMask;
|
||||
IPaddr_t ServerNet = TftpServerIP & NetOurSubnetMask;
|
||||
|
||||
if (OurNet != ServerNet) {
|
||||
puts ("; sending through gateway ");
|
||||
print_IPaddr (NetOurGatewayIP) ;
|
||||
}
|
||||
if (OurNet != ServerNet)
|
||||
printf("; sending through gateway %pI4", &NetOurGatewayIP);
|
||||
}
|
||||
putc ('\n');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue