diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-29 11:12:34 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-29 11:12:36 +0100 |
commit | cd9a7567b0d5afd874dcd31fd22918868e9eab9e (patch) | |
tree | da6a58b549b5d5e830f02d1c7ef64eab815cf02e /net | |
parent | 39851d3d15055504bbfd7170a66bbb728d1401c5 (diff) | |
download | barebox-cd9a7567b0d5afd874dcd31fd22918868e9eab9e.tar.gz barebox-cd9a7567b0d5afd874dcd31fd22918868e9eab9e.tar.xz |
ping command: Print which host is pinged
When a hostname instead a IP is given to the ping command then the
IP the host is resolved to is a useful information. Add a message
printing it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/ping.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ping.c b/net/ping.c index 4eb77cb785..b5926280e0 100644 --- a/net/ping.c +++ b/net/ping.c @@ -76,6 +76,8 @@ static int do_ping(int argc, char *argv[]) goto out; } + printf("PING %s (%pI4)\n", argv[1], &net_ping_ip); + ping_start = get_time_ns(); ret = ping_send(); if (ret) |