Util-Linux package development
 help / color / mirror / Atom feed
From: J William Piggott <elseifthen@gmx.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: [PATCH 2/2] hwclock: make debug implicit for test mode.
Date: Thu, 21 Sep 2017 16:10:51 -0400	[thread overview]
Message-ID: <719020ca-427f-971d-31b1-14f4fda54f00@gmx.com> (raw)
In-Reply-To: <a996a4b2-89f5-eb63-a0cb-499830bce2e6@gmx.com>


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 | 8 ++++----
 sys-utils/hwclock.c    | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/sys-utils/hwclock.8.in b/sys-utils/hwclock.8.in
index a3cbc015e..d88feb07b 100644
--- a/sys-utils/hwclock.8.in
+++ b/sys-utils/hwclock.8.in
@@ -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
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 6a23bf2b0..36b6204b0 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -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 */

  parent reply	other threads:[~2017-09-21 20:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 20:08 [PATCH 0/2] pull request J William Piggott
2017-09-21 20:09 ` [PATCH 1/2] hwclock: exit bug fix and single test mode message J William Piggott
2017-09-21 20:10 ` J William Piggott [this message]
2017-09-22 10:04 ` [PATCH 0/2] pull request Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=719020ca-427f-971d-31b1-14f4fda54f00@gmx.com \
    --to=elseifthen@gmx.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox