summaryrefslogtreecommitdiffhomepage
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-21 11:58:43 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-21 11:58:43 +0200
commita680f40bfef135bf0511bbbdb5c2f6f4c4adea7c (patch)
treef4a64f8a31359c1579b4545b3ed8160cdbe5302f /networking
parent72089cf6b4a77214ec4fd21d5ee5bf56958781cb (diff)
ping: better config help text for FEATURE_FANCY_PING
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/ping.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/networking/ping.c b/networking/ping.c
index cdfb297e9..e70bb7e72 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -66,8 +66,9 @@
//config: default y
//config: depends on PING || PING6
//config: help
-//config: Make the output from the ping applet include statistics, and at the
-//config: same time provide full support for ICMP packets.
+//config: With this option off, ping will say "HOST is alive!"
+//config: or terminate with SIGALRM in 5 seconds otherwise.
+//config: No command-line options will be recognized.
/* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */
//applet:IF_PING(APPLET(ping, BB_DIR_BIN, BB_SUID_MAYBE))
@@ -236,8 +237,6 @@ static void ping4(len_and_sockaddr *lsa)
break;
}
}
- if (ENABLE_FEATURE_CLEAN_UP)
- close(pingsock);
}
#if ENABLE_PING6
@@ -280,8 +279,6 @@ static void ping6(len_and_sockaddr *lsa)
break;
}
}
- if (ENABLE_FEATURE_CLEAN_UP)
- close(pingsock);
}
#endif
@@ -331,6 +328,8 @@ static int common_ping_main(sa_family_t af, char **argv)
else
#endif
ping4(lsa);
+ if (ENABLE_FEATURE_CLEAN_UP)
+ close(pingsock);
printf("%s is alive!\n", G.hostname);
return EXIT_SUCCESS;
}