]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: make debug implicit for test mode.
authorJ William Piggott <elseifthen@gmx.com>
Wed, 20 Sep 2017 22:54:35 +0000 (18:54 -0400)
committerJ William Piggott <elseifthen@gmx.com>
Thu, 21 Sep 2017 18:53:43 +0000 (14:53 -0400)
Calling --test without --debug is not useful, so
make it implicit.

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

index a3cbc015e66f9be5c709d122eddc4936918c14fa..d88feb07b36064d8fe433273e6257fa6d3896823 100644 (file)
@@ -372,10 +372,10 @@ must be specified when using this option.
 .
 .TP
 .B \-\-test
-Do not actually change anything on the system, i.e., the Clocks or
-adjtime file.  This is useful, especially in conjunction with
-.BR \%\-\-debug ,
-in learning about the internal operations of hwclock.
+Do not actually change anything on the system, that is, the Clocks or
+.I @ADJTIME_PATH@
+.RB ( \%\-\-debug
+is implicit with this option).
 .
 .TP
 .B \-\-update\-drift
index 6a23bf2b0c85683adf59ad7a89d8bbcf3ff73891..36b6204b01dde4457af4221b82c0157029f28a98 100644 (file)
@@ -1083,7 +1083,7 @@ usage(void)
               "     --noadjfile      do not use %1$s\n"), _PATH_ADJTIME);
        printf(_(
               "     --adjfile <file> use an alternate file to %1$s\n"), _PATH_ADJTIME);
-       puts(_("     --test           dry run; use -D to view what would have happened"));
+       puts(_("     --test           dry run; implies --debug"));
        puts(_(" -D, --debug          display more details"));
        fputs(USAGE_SEPARATOR, stdout);
        printf(USAGE_HELP_OPTIONS(22));
@@ -1251,6 +1251,7 @@ int main(int argc, char **argv)
                        break;
                case OPT_TEST:
                        ctl.testing = 1;        /* --test */
+                       ctl.debug++;
                        break;
                case OPT_DATE:
                        ctl.date_opt = optarg;  /* --date */