diff options
author | J William Piggott | 2017-12-24 21:38:58 +0100 |
---|---|---|
committer | Karel Zak | 2018-01-22 11:10:22 +0100 |
commit | ff4e18bd2d6e5509782ca18dc0619bdcee1d6caa (patch) | |
tree | 74fbb5d36d54d8acb3820179ec51253e175c6564 /sys-utils/hwclock.h | |
parent | mount(8): point people to the proc(5) page for mount options (diff) | |
download | kernel-qcow2-util-linux-ff4e18bd2d6e5509782ca18dc0619bdcee1d6caa.tar.gz kernel-qcow2-util-linux-ff4e18bd2d6e5509782ca18dc0619bdcee1d6caa.tar.xz kernel-qcow2-util-linux-ff4e18bd2d6e5509782ca18dc0619bdcee1d6caa.zip |
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 <kerolasa@iki.fi>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/hwclock.h')
-rw-r--r-- | sys-utils/hwclock.h | 14 |
1 files changed, 12 insertions, 2 deletions
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 <time.h> #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 { |