]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: fix debug regression
authorJ William Piggott <elseifthen@gmx.com>
Sat, 18 Nov 2017 01:25:40 +0000 (20:25 -0500)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Dec 2017 14:37:26 +0000 (15:37 +0100)
commit f0a0ce7 makes debug mode implicit for the --test option.

Using the previous command syntax of --test and --debug
together invokes the undocumented Level 2 debugging when
setting the RTC. This can cause many thousands of lines of
output like:
1510967983.499968 < 1510967983.500000 (-0.000032)

Fix: bump Level 2 debugging to Level 9, just before the
other undocumented Level 10. This makes it improbable for
the development debug levels to be accessed unintentionally.

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

index c2c20812c888944eac9f312ff01ffd69a0e73afe..566a70cadb87f61f5c9ca284982b0734218dc157 100644 (file)
@@ -494,7 +494,7 @@ set_hardware_clock_exact(const struct hwclock_control *ctl,
                        /* The retarget is handled at the end of the loop. */
                } else if (deltavstarget < 0) {
                        /* deltavstarget < 0 if current time < target time */
-                       if (ctl->debug >= 2)
+                       if (ctl->debug >= 9)
                                printf(_("%ld.%06ld < %ld.%06ld (%.6f)\n"),
                                       nowsystime.tv_sec,
                                       nowsystime.tv_usec,