summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.c
diff options
context:
space:
mode:
authorJ William Piggott2017-04-20 01:29:26 +0200
committerJ William Piggott2017-04-27 05:19:56 +0200
commit66c83c1c7f4294fbe1b1683e2c972205650c6b85 (patch)
treeef47a66e512b54ecf8c3d6adfb49c7c01fd1d32f /sys-utils/hwclock.c
parentswitch_root: unlink files without _DIRENT_HAVE_D_TYPE (diff)
downloadkernel-qcow2-util-linux-66c83c1c7f4294fbe1b1683e2c972205650c6b85.tar.gz
kernel-qcow2-util-linux-66c83c1c7f4294fbe1b1683e2c972205650c6b85.tar.xz
kernel-qcow2-util-linux-66c83c1c7f4294fbe1b1683e2c972205650c6b85.zip
hwclock: extra messages for debug only
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>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r--sys-utils/hwclock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index a98f4e325..31ee8fed7 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -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;
}