[git commit] help text tweaks, mainly expanding one for route

Denys Vlasenko vda.linux at googlemail.com
Fri Dec 18 22:33:19 UTC 2020


commit: https://git.busybox.net/busybox/commit/?id=b164cdb854e6722ab39aa62dbfad84ea37a29a30
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

function                                             old     new   delta
packed_usage                                       33485   33527     +42

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/ping.c  |  8 ++++----
 networking/pscan.c | 10 +++++-----
 networking/route.c | 21 ++++++++++++---------
 networking/tftp.c  |  2 +-
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/networking/ping.c b/networking/ping.c
index 318d561bb..bbf9f0db1 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -58,16 +58,16 @@
 //usage:# define ping_trivial_usage
 //usage:       "HOST"
 //usage:# define ping_full_usage "\n\n"
-//usage:       "Send ICMP ECHO_REQUEST packets to network hosts"
+//usage:       "Send ICMP ECHO_REQUESTs to HOST"
 //usage:# define ping6_trivial_usage
 //usage:       "HOST"
 //usage:# define ping6_full_usage "\n\n"
-//usage:       "Send ICMP ECHO_REQUEST packets to network hosts"
+//usage:       "Send ICMP ECHO_REQUESTs to HOST"
 //usage:#else
 //usage:# define ping_trivial_usage
 //usage:       "[OPTIONS] HOST"
 //usage:# define ping_full_usage "\n\n"
-//usage:       "Send ICMP ECHO_REQUEST packets to network hosts\n"
+//usage:       "Send ICMP ECHO_REQUESTs to HOST\n"
 //usage:	IF_PING6(
 //usage:     "\n	-4,-6		Force IP or IPv6 name resolution"
 //usage:	)
@@ -88,7 +88,7 @@
 //usage:# define ping6_trivial_usage
 //usage:       "[OPTIONS] HOST"
 //usage:# define ping6_full_usage "\n\n"
-//usage:       "Send ICMP ECHO_REQUEST packets to network hosts\n"
+//usage:       "Send ICMP ECHO_REQUESTs to HOST\n"
 //usage:     "\n	-c CNT		Send only CNT pings"
 //usage:     "\n	-s SIZE		Send SIZE data bytes in packets (default 56)"
 //usage:     "\n	-i SECS		Interval"
diff --git a/networking/pscan.c b/networking/pscan.c
index e114e55d2..816178bbc 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -18,13 +18,13 @@
 //usage:#define pscan_trivial_usage
 //usage:       "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
 //usage:#define pscan_full_usage "\n\n"
-//usage:       "Scan a host, print all open ports\n"
+//usage:       "Scan HOST, print all open ports\n"
 //usage:     "\n	-c	Show closed ports too"
 //usage:     "\n	-b	Show blocked ports too"
-//usage:     "\n	-p	Scan from this port (default 1)"
-//usage:     "\n	-P	Scan up to this port (default 1024)"
-//usage:     "\n	-t	Timeout (default 5000 ms)"
-//usage:     "\n	-T	Minimum rtt (default 5 ms, increase for congested hosts)"
+//usage:     "\n	-p PORT	Scan from this port (default 1)"
+//usage:     "\n	-P PORT	Scan up to this port (default 1024)"
+//usage:     "\n	-t MS	Timeout (default 5000 ms)"
+//usage:     "\n	-T MS	Minimum rtt (default 5 ms)"
 
 #include "libbb.h"
 
diff --git a/networking/route.c b/networking/route.c
index 4901109f1..b08ab5c68 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -34,14 +34,6 @@
 
 //kbuild:lib-$(CONFIG_ROUTE) += route.o
 
-//usage:#define route_trivial_usage
-//usage:       "[{add|del|delete}]"
-//usage:#define route_full_usage "\n\n"
-//usage:       "Edit kernel routing tables\n"
-//usage:     "\n	-n	Don't resolve names"
-//usage:     "\n	-e	Display other/more information"
-//usage:     "\n	-A inet" IF_FEATURE_IPV6("{6}") "	Select address family"
-
 #include <net/route.h>
 #include <net/if.h>
 
@@ -208,7 +200,7 @@ static NOINLINE void INET_setroute(int action, char **args)
 			/* Default netmask. */
 			netmask = "default";
 		}
-		/* Prefer hostname lookup is -host flag (xflag==1) was given. */
+		/* Prefer hostname lookup if -host flag (xflag==1) was given. */
 		isnet = INET_resolve(target, (struct sockaddr_in *) &rt->rt_dst,
 							 (xflag & HOST_FLAG));
 		if (isnet < 0) {
@@ -653,6 +645,17 @@ static void INET6_displayroutes(void)
 
 #endif
 
+//usage:#define route_trivial_usage
+///////:       "[-ne]"IF_FEATURE_IPV6(" [-A inet[6]]")" [{add|del|delete} [-net|-host] TARGET [netmask MASK] [gw GATEWAY] [metric N] [mss BYTES] [window BYTES] [irtt MSEC] [reject] [mod] [dyn] [reinstate] [[dev] IFACE]]"
+///////too wordy
+//usage:       "[-ne]"IF_FEATURE_IPV6(" [-A inet[6]]")" [{add|del} TARGET [netmask MASK]\n"
+//usage:       "	[gw GATEWAY] [metric N] [mss BYTES] [window BYTES] [reject] [IFACE]]"
+//usage:#define route_full_usage "\n\n"
+//usage:       "Show or edit kernel routing tables\n"
+//usage:     "\n	-n	Don't resolve names"
+//usage:     "\n	-e	Display other/more information"
+//usage:     "\n	-A inet" IF_FEATURE_IPV6("[6]") "	Select address family"
+
 #define ROUTE_OPT_A     0x01
 #define ROUTE_OPT_n     0x02
 #define ROUTE_OPT_e     0x04
diff --git a/networking/tftp.c b/networking/tftp.c
index 60fdff232..7c2c84bed 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -104,7 +104,7 @@
 //usage:     "\n	-p	Put file"
 //usage:	)
 //usage:	IF_FEATURE_TFTP_BLOCKSIZE(
-//usage:     "\n	-b SIZE	Transfer blocks of SIZE octets"
+//usage:     "\n	-b SIZE	Transfer blocks in bytes"
 //usage:	)
 ///////:     "\n	-m STR	Accepted and ignored ('-m binary' compat with tftp-hpa 5.2)"
 //usage:


More information about the busybox-cvs mailing list