From: J William Piggott Date: Wed, 19 Apr 2017 23:29:26 +0000 (-0400) Subject: hwclock: extra messages for debug only X-Git-Tag: v2.30-rc1~77^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66c83c1c7f4294fbe1b1683e2c972205650c6b85;p=thirdparty%2Futil-linux.git 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 --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index a98f4e3259..31ee8fed7a 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; }