Update the ping command so that a host name is accepted in addition to
an IP address, provided DNS support is enabled.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
#include <time.h>
U_BOOT_CMD(ping, 2, 1, do_ping, "send ICMP ECHO_REQUEST to network host",
- "pingAddress");
+ "pingAddressOrHostName");
#define PING_DELAY_MS 1000
#define PING_COUNT 5
if (argc < 2)
return CMD_RET_USAGE;
- if (!ipaddr_aton(argv[1], &addr))
+ if (net_lwip_dns_resolve(argv[1], &addr))
return CMD_RET_USAGE;
restart: