summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.h
diff options
context:
space:
mode:
authorKarel Zak2018-07-18 13:59:15 +0200
committerKarel Zak2018-07-18 13:59:15 +0200
commitdf4f1a664700626f0b949a0cae87a3a735be46db (patch)
tree3711eb34ceac8cffa317d52a4b3fc5f195dac058 /sys-utils/hwclock.h
parentbuild-sys: add -Wno-cast-function-type for python (diff)
downloadkernel-qcow2-util-linux-df4f1a664700626f0b949a0cae87a3a735be46db.tar.gz
kernel-qcow2-util-linux-df4f1a664700626f0b949a0cae87a3a735be46db.tar.xz
kernel-qcow2-util-linux-df4f1a664700626f0b949a0cae87a3a735be46db.zip
hwclock: add --delay <seconds>
* add command line option --delay <seconds> * read RTC type from /sys/class/rtc/rtc<N>/name * default to 0.5 (500ms) for rtc_cmos or when RTC type is impossible determine; otherwise delay is 0. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/hwclock.h')
-rw-r--r--sys-utils/hwclock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
index 7bb6ec8bd..92fdb5f82 100644
--- a/sys-utils/hwclock.h
+++ b/sys-utils/hwclock.h
@@ -22,6 +22,7 @@ UL_DEBUG_DECLARE_MASK(hwclock);
struct hwclock_control {
char *date_opt;
char *adj_file_name;
+ double rtc_delay; /* --delay <seconds> */
#if defined(__linux__) && defined(__alpha__)
char *epoch_option;
#endif
@@ -58,6 +59,7 @@ struct clock_ops {
int (*read_hardware_clock) (const struct hwclock_control *ctl, struct tm * tm);
int (*set_hardware_clock) (const struct hwclock_control *ctl, const struct tm * tm);
int (*synchronize_to_clock_tick) (const struct hwclock_control *ctl);
+ const char *(*get_device_path) (void);
};
extern struct clock_ops *probe_for_cmos_clock(void);