]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: update usage() to util-linux style
authorJ William Piggott <elseifthen@gmx.com>
Fri, 21 Apr 2017 00:44:13 +0000 (20:44 -0400)
committerJ William Piggott <elseifthen@gmx.com>
Tue, 20 Jun 2017 23:15:05 +0000 (19:15 -0400)
Update usage() according to:
  Documentation/howto-usage-function.txt
  Documentation/boilerplate.c

Signed-off-by: J William Piggott <elseifthen@gmx.com>
sys-utils/hwclock.c

index 478231821130c2d0fdd2fb38ae92e03cf2067af5..d2f8ad157c648ca177b02315ed67645f5e9329cd 100644 (file)
@@ -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 <file> 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);
 }