From 88bc304ba815e21b09373cfec4e2f1f087482214 Mon Sep 17 00:00:00 2001 From: Carlos Santos Date: Wed, 3 Jul 2019 13:31:34 -0300 Subject: hwclock: use CMOS clock only if available - Add --disable-hwclock-cmos configuration argument - Add USE_HWCLOCK_CMOS (enabled by default for i386/x86_64) - Add define(USE_HWCLOCK_CMOS) - Compile hwclock-cmos.c only if USE_HWCLOCK_CMOS is true - Remove all unnecessary #ifdefs from hwclock-cmos.c - Add #ifdef USE_HWCLOCK_CMOS around the determine_clock_access_method() call in hwclock.c Signed-off-by: Carlos Santos --- sys-utils/hwclock.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys-utils/hwclock.c') diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index a2c5cc2a4..c01a86826 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -925,8 +925,10 @@ static void determine_clock_access_method(const struct hwclock_control *ctl) { ur = NULL; +#ifdef USE_HWCLOCK_CMOS if (ctl->directisa) ur = probe_for_cmos_clock(); +#endif #ifdef __linux__ if (!ur) ur = probe_for_rtc_clock(ctl); -- cgit v1.2.3-55-g7522