[git commit] tweak help texts

Denys Vlasenko vda.linux at googlemail.com
Wed Dec 16 00:19:08 UTC 2020


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

function                                             old     new   delta
packed_usage                                       33650   33605     -45

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 loginutils/chpasswd.c         | 10 +---------
 networking/udhcp/dumpleases.c |  8 --------
 selinux/chcon.c               |  8 ++++----
 util-linux/hwclock.c          | 11 +++++------
 util-linux/rtcwake.c          | 18 ++++++------------
 5 files changed, 16 insertions(+), 39 deletions(-)

diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 4e70b2557..a032abbed 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -24,21 +24,13 @@
 //kbuild:lib-$(CONFIG_CHPASSWD) += chpasswd.o
 
 //usage:#define chpasswd_trivial_usage
-//usage:	IF_LONG_OPTS("[--md5|--encrypted|--crypt-method|--root]") IF_NOT_LONG_OPTS("[-m|-e|-c|-R]")
+//usage:	"[-me] [-c ALG] [-R DIR]"
 //usage:#define chpasswd_full_usage "\n\n"
 //usage:       "Read user:password from stdin and update /etc/passwd\n"
-//usage:	IF_LONG_OPTS(
-//usage:     "\n	-e,--encrypted		Supplied passwords are in encrypted form"
-//usage:     "\n	-m,--md5		Encrypt using md5, not des"
-//usage:     "\n	-c,--crypt-method ALG	"CRYPT_METHODS_HELP_STR
-//usage:     "\n	-R,--root DIR		Directory to chroot into"
-//usage:	)
-//usage:	IF_NOT_LONG_OPTS(
 //usage:     "\n	-e	Supplied passwords are in encrypted form"
 //usage:     "\n	-m	Encrypt using md5, not des"
 //usage:     "\n	-c ALG	"CRYPT_METHODS_HELP_STR
 //usage:     "\n	-R DIR	Directory to chroot into"
-//usage:	)
 
 #include "libbb.h"
 
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index 70d2d1434..1e9405205 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -10,18 +10,10 @@
 //usage:       "[-r|-a] [-d] [-f LEASEFILE]"
 //usage:#define dumpleases_full_usage "\n\n"
 //usage:       "Display DHCP leases granted by udhcpd\n"
-//usage:	IF_LONG_OPTS(
-//usage:     "\n	-f,--file FILE	Lease file"
-//usage:     "\n	-r,--remaining	Show remaining time"
-//usage:     "\n	-a,--absolute	Show expiration time"
-//usage:     "\n	-d,--decimal	Show time in seconds"
-//usage:	)
-//usage:	IF_NOT_LONG_OPTS(
 //usage:     "\n	-f FILE	Lease file"
 //usage:     "\n	-r	Show remaining time"
 //usage:     "\n	-a	Show expiration time"
 //usage:     "\n	-d	Show time in seconds"
-//usage:	)
 
 #include "common.h"
 #include "dhcpd.h"
diff --git a/selinux/chcon.c b/selinux/chcon.c
index 9b13679b8..2e4f94c0f 100644
--- a/selinux/chcon.c
+++ b/selinux/chcon.c
@@ -19,10 +19,10 @@
 //kbuild:lib-$(CONFIG_CHCON) += chcon.o
 
 //usage:#define chcon_trivial_usage
-//usage:       "[OPTIONS] CONTEXT FILE..."
-//usage:       "\n	chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..."
+//usage:       "[-chfRv] CONTEXT FILE..."
+//usage:       "\n	chcon [-chfRv] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..."
 //usage:	IF_LONG_OPTS(
-//usage:       "\n	chcon [OPTIONS] --reference=RFILE FILE..."
+//usage:       "\n	chcon [-chfRv] --reference=RFILE FILE..."
 //usage:	)
 //usage:
 //usage:#define chcon_full_usage "\n\n"
@@ -37,7 +37,7 @@
 //usage:     "\n	-u USER	Set user/role/type/range in the target security context"
 //usage:     "\n	-r ROLE"
 //usage:     "\n	-t TYPE"
-//usage:     "\n	-l RNG"
+//usage:     "\n	-l RANGE"
 //usage:     "\n	-R	Recurse"
 
 #include <selinux/context.h>
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index e85bca2b2..791525fc2 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -296,16 +296,15 @@ static void set_system_clock_timezone(int utc)
 
 //usage:#define hwclock_trivial_usage
 //usage:	IF_LONG_OPTS(
-//usage:       "[-r|--show] [-s|--hctosys] [-w|--systohc] [--systz]"
-//usage:       " [--localtime] [-u|--utc]"
-//usage:       " [-f|--rtc FILE]"
+//usage:       "[-swu] [--systz] [--localtime] [-f FILE]"
 //usage:	)
 //usage:	IF_NOT_LONG_OPTS(
-//usage:       "[-r] [-s] [-w] [-t] [-l] [-u] [-f FILE]"
+//usage:       "[-swtlu] [-f FILE]"
 //usage:	)
 //usage:#define hwclock_full_usage "\n\n"
-//usage:       "Query and set hardware clock (RTC)\n"
-//usage:     "\n	-r	Show hardware clock time"
+//usage:       "Show or set hardware clock (RTC)\n"
+///////:     "\n	-r	Show hardware clock time"
+///////-r is default, don't bother showing it in help
 //usage:     "\n	-s	Set system time from hardware clock"
 //usage:     "\n	-w	Set hardware clock from system time"
 //usage:	IF_LONG_OPTS(
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index 823e55662..be7e95099 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -32,28 +32,22 @@
 
 //kbuild:lib-$(CONFIG_RTCWAKE) += rtcwake.o
 
+//usage:#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
+//usage:# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
+//usage:#else
+//usage:# define ADJTIME_PATH "/etc/adjtime"
+//usage:#endif
 //usage:#define rtcwake_trivial_usage
 //usage:       "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
 //usage:#define rtcwake_full_usage "\n\n"
 //usage:       "Enter a system sleep state until specified wakeup time\n"
-//usage:	IF_LONG_OPTS(
-//usage:     "\n	-a,--auto	Read clock mode from adjtime"
-//usage:     "\n	-l,--local	Clock is set to local time"
-//usage:     "\n	-u,--utc	Clock is set to UTC time"
-//usage:     "\n	-d,--device DEV	Specify the RTC device"
-//usage:     "\n	-m,--mode MODE	Set sleep state (default: standby)"
-//usage:     "\n	-s,--seconds SEC Set timeout in SEC seconds from now"
-//usage:     "\n	-t,--time TIME	Set timeout to TIME seconds from epoch"
-//usage:	)
-//usage:	IF_NOT_LONG_OPTS(
-//usage:     "\n	-a	Read clock mode from adjtime"
+//usage:     "\n	-a	Read clock mode from "ADJTIME_PATH" (default)"
 //usage:     "\n	-l	Clock is set to local time"
 //usage:     "\n	-u	Clock is set to UTC time"
 //usage:     "\n	-d DEV	Specify the RTC device"
 //usage:     "\n	-m MODE	Set sleep state (default: standby)"
 //usage:     "\n	-s SEC	Set timeout in SEC seconds from now"
 //usage:     "\n	-t TIME	Set timeout to TIME seconds from epoch"
-//usage:	)
 
 #include "libbb.h"
 #include "rtc_.h"


More information about the busybox-cvs mailing list