summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock-cmos.c
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-cmos.c
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-cmos.c')
-rw-r--r--sys-utils/hwclock-cmos.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index f7e8a1811..426ef4c23 100644
--- a/sys-utils/hwclock-cmos.c
+++ b/sys-utils/hwclock-cmos.c
@@ -393,12 +393,18 @@ static int get_permissions_cmos(void)
return rc;
}
+static get_device_path(void)
+{
+ return NULL;
+}
+
static struct clock_ops cmos_interface = {
N_("Using direct ISA access to the clock"),
get_permissions_cmos,
read_hardware_clock_cmos,
set_hardware_clock_cmos,
synchronize_to_clock_tick_cmos,
+ get_device_path,
};
/*