summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.h
diff options
context:
space:
mode:
authorKarel Zak2012-05-31 11:15:07 +0200
committerKarel Zak2012-06-26 20:48:23 +0200
commitc7f753901f45bffdf39506e4f19bba4c37659ccc (patch)
tree88fc1be2f3f104144b4a45737a070ebf76801106 /sys-utils/hwclock.h
parentbuild-sys: convert sys-utils/ to module (diff)
downloadkernel-qcow2-util-linux-c7f753901f45bffdf39506e4f19bba4c37659ccc.tar.gz
kernel-qcow2-util-linux-c7f753901f45bffdf39506e4f19bba4c37659ccc.tar.xz
kernel-qcow2-util-linux-c7f753901f45bffdf39506e4f19bba4c37659ccc.zip
build-sys: move hwclock to sys-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/hwclock.h')
-rw-r--r--sys-utils/hwclock.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
new file mode 100644
index 000000000..175a6d1ae
--- /dev/null
+++ b/sys-utils/hwclock.h
@@ -0,0 +1,47 @@
+#ifndef HWCLOCK_CLOCK_H
+#define HWCLOCK_CLOCK_H
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "c.h"
+
+struct clock_ops {
+ char *interface_name;
+ int (*get_permissions) (void);
+ int (*read_hardware_clock) (struct tm * tm);
+ int (*set_hardware_clock) (const struct tm * tm);
+ int (*synchronize_to_clock_tick) (void);
+};
+
+extern struct clock_ops *probe_for_cmos_clock(void);
+extern struct clock_ops *probe_for_rtc_clock(void);
+extern struct clock_ops *probe_for_kd_clock(void);
+
+typedef int bool;
+
+/* hwclock.c */
+extern char *progname;
+extern int debug;
+extern unsigned long epoch_option;
+extern double time_diff(struct timeval subtrahend, struct timeval subtractor);
+/* cmos.c */
+extern void set_cmos_epoch(int ARCconsole, int SRM);
+extern void set_cmos_access(int Jensen, int funky_toy);
+
+/* rtc.c */
+extern int get_epoch_rtc(unsigned long *epoch, int silent);
+extern int set_epoch_rtc(unsigned long epoch);
+extern char *rtc_dev_name;
+
+#ifdef HAVE_LIBAUDIT
+extern void hwaudit_exit(int status);
+# define hwclock_exit(_status) hwaudit_exit(_status)
+#else
+# define hwclock_exit(_status) exit(_status)
+#endif
+
+#endif /* HWCLOCK_CLOCK_H */