diff options
author | Thomas Huth <thuth@redhat.com> | 2016-09-19 21:08:24 +0200 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-10-10 17:30:54 +1100 |
commit | 9e34542c0fc0a1ec1b28ff81f812d2cd4f38df64 (patch) | |
tree | 2a996fd17119b53e55f8d247b515daca4d2d5ddd /lib | |
parent | 265ee13712b191e51bc932c27e95f3acba6b8121 (diff) | |
download | SLOF-9e34542c0fc0a1ec1b28ff81f812d2cd4f38df64.zip SLOF-9e34542c0fc0a1ec1b28ff81f812d2cd4f38df64.tar.gz SLOF-9e34542c0fc0a1ec1b28ff81f812d2cd4f38df64.tar.bz2 |
libnet: Fix the printout of the ping command
Commit 7e31382cca5fb988b ("Improve printed text when booting
via network") moved the "Requesting information via DHCP..."
printf statement from the netboot() function into the dhcp()
function. However, it did not take into account that the
ping() function should be changed in the same way, so with
ping, the message is currently printed out twice. So let's
re-arrange the printout of ping() now accordingly.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libnet/ping.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libnet/ping.c b/lib/libnet/ping.c index 2b6a1d7..3da519f 100644 --- a/lib/libnet/ping.c +++ b/lib/libnet/ping.c @@ -156,7 +156,6 @@ ping(int argc, char *argv[]) if (!ping_args.client_ip.integer) { /* Get ip address for our mac address */ - printf(" Requesting IP address via DHCP: "); arp_failed = dhcp(0, &fn_ip, 30, F_IPV4); if (arp_failed == -1) { @@ -178,13 +177,12 @@ ping(int argc, char *argv[]) set_ipv4_netmask(ping_args.netmask); arp_failed = 1; - printf(" Own IP address: "); } // reinit network stack set_ipv4_address(fn_ip.own_ip); - printf("%d.%d.%d.%d\n", + printf(" Own IP address: %d.%d.%d.%d\n", ((fn_ip.own_ip >> 24) & 0xFF), ((fn_ip.own_ip >> 16) & 0xFF), ((fn_ip.own_ip >> 8) & 0xFF), (fn_ip.own_ip & 0xFF)); |