From cd9a7567b0d5afd874dcd31fd22918868e9eab9e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 29 Nov 2018 11:12:34 +0100 Subject: 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 --- net/ping.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3