From: J William Piggott Date: Fri, 21 Apr 2017 00:44:13 +0000 (-0400) Subject: hwclock: update usage() to util-linux style X-Git-Tag: v2.31-rc1~279^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=064f776c37d203582687ff80751d8cafca276afd;p=thirdparty%2Futil-linux.git hwclock: update usage() to util-linux style Update usage() according to: Documentation/howto-usage-function.txt Documentation/boilerplate.c Signed-off-by: J William Piggott --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 4782318211..d2f8ad157c 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1206,11 +1206,11 @@ usage(const struct hwclock_control *ctl, FILE *usageto) fputs(_(" hwclock [function] [option...]\n"), usageto); fputs(USAGE_SEPARATOR, usageto); - fputs(_("Query or set the hardware clock.\n"), usageto); + fputs(_(" Query or set the hardware clock\n"), usageto); - fputs(_("\nFunctions:\n"), usageto); - fputs(_(" -h, --help show this help text and exit\n" - " -r, --show read hardware clock and print result\n" + fputs(USAGE_SEPARATOR, usageto); + fputs(_("Functions:\n"), usageto); + fputs(_(" -r, --show read hardware clock and print result\n" " --get read hardware clock and print drift corrected result\n" " --set set the RTC to the time given with --date\n"), usageto); fputs(_(" -s, --hctosys set the system time from the hardware clock\n" @@ -1223,8 +1223,7 @@ usage(const struct hwclock_control *ctl, FILE *usageto) " --setepoch set the kernel's hardware clock epoch value to the \n" " value given with --epoch\n"), usageto); #endif - fputs(_(" --predict predict RTC reading at time given with --date\n" - " -V, --version display version information and exit\n"), usageto); + fputs(_(" --predict predict RTC reading at time given with --date\n"), usageto); fputs(USAGE_OPTIONS, usageto); fputs(_(" -u, --utc the hardware clock is kept in UTC\n" @@ -1246,8 +1245,11 @@ usage(const struct hwclock_control *ctl, FILE *usageto) " --adjfile specifies the path to the adjust file;\n" " the default is %1$s\n"), _PATH_ADJTIME); fputs(_(" --test do not update anything, just show what would happen\n" - " -D, --debug debugging mode\n" "\n"), usageto); - + " -D, --debug debugging mode\n"), usageto); + fputs(USAGE_SEPARATOR, usageto); + fputs(USAGE_HELP, usageto); + fputs(USAGE_VERSION, usageto); + fprintf(usageto, USAGE_MAN_TAIL("hwclock(8)")); hwclock_exit(ctl, EXIT_SUCCESS); }