]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: extra messages for debug only
authorJ William Piggott <elseifthen@gmx.com>
Wed, 19 Apr 2017 23:29:26 +0000 (19:29 -0400)
committerJ William Piggott <elseifthen@gmx.com>
Thu, 27 Apr 2017 03:19:56 +0000 (23:19 -0400)
Only print extra save_adjtime() messages in debug mode. This makes
the --test mode output consistent accross functions.

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

index a98f4e3259d36ab26a6db5c296ffd1a5f672b0f7..31ee8fed7a6811dc9be491c8774520b7d2f88394 100644 (file)
@@ -919,10 +919,10 @@ static void save_adjtime(const struct hwclock_control *ctl,
                  (adjtime->local_utc == LOCAL) ? "LOCAL" : "UTC");
 
        if (ctl->testing) {
-               printf(_
-                      ("Not updating adjtime file because of testing mode.\n"));
-               printf(_("Would have written the following to %s:\n%s"),
-                      ctl->adj_file_name, content);
+               if (ctl->debug){
+                       printf(_("Test mode: %s was not updated with:\n%s"),
+                              ctl->adj_file_name, content);
+               }
                free(content);
                return;
        }