From ff4e18bd2d6e5509782ca18dc0619bdcee1d6caa Mon Sep 17 00:00:00 2001 From: J William Piggott Date: Sun, 24 Dec 2017 15:38:58 -0500 Subject: hwclock: add --ul-debug implementing debug.h Undocumented at this time, because it is a skeleton implementation. More debugging points are to be added after refactoring is complete, or ad hoc in the mean time. When fully implemented, enough time may have passed that the deprecated --debug could be used to replace --ul-debug. [kzak@redhat.com: - use __UL_INIT_DEBUG_FROM_STRING() to initialize the mask - add hwclock_init_debug()] Coauthored-by: Sami Kerola Signed-off-by: Sami Kerola Signed-off-by: J William Piggott Signed-off-by: Karel Zak --- sys-utils/hwclock.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sys-utils/hwclock.h') diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h index 570bfe439..7bb6ec8bd 100644 --- a/sys-utils/hwclock.h +++ b/sys-utils/hwclock.h @@ -8,6 +8,16 @@ #include #include "c.h" +#include "debug.h" + +#define HWCLOCK_DEBUG_INIT (1 << 0) +#define HWCLOCK_DEBUG_RANDOM_SLEEP (1 << 1) +#define HWCLOCK_DEBUG_DELTA_VS_TARGET (1 << 2) +#define HWCLOCK_DEBUG_ALL 0xFFFF + +UL_DEBUG_DECLARE_MASK(hwclock); +#define DBG(m, x) __UL_DBG(hwclock, HWCLOCK_DEBUG_, m, x) +#define ON_DBG(m, x) __UL_DBG_CALL(hwclock, HWCLOCK_DEBUG_, m, x) struct hwclock_control { char *date_opt; @@ -18,7 +28,6 @@ struct hwclock_control { #ifdef __linux__ char *rtc_dev_name; #endif - unsigned int verbose; unsigned int hwaudit_on:1, adjust:1, @@ -39,7 +48,8 @@ struct hwclock_control { get:1, set:1, update:1, - universal:1; /* will store hw_clock_is_utc() return value */ + universal:1, /* will store hw_clock_is_utc() return value */ + verbose:1; }; struct clock_ops { -- cgit v1.2.3-55-g7522