summaryrefslogtreecommitdiffstats
path: root/hwclock/clock.h
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:44 +0100
committerKarel Zak2006-12-07 00:25:44 +0100
commit66ee8158b69525e12060ef558cb5d77feadab1dc (patch)
tree08b30f2d07df9213f5647bc6f60b5090a263ef43 /hwclock/clock.h
parentImported from util-linux-2.10m tarball. (diff)
downloadkernel-qcow2-util-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.tar.gz
kernel-qcow2-util-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.tar.xz
kernel-qcow2-util-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.zip
Imported from util-linux-2.10s tarball.
Diffstat (limited to 'hwclock/clock.h')
-rw-r--r--hwclock/clock.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/hwclock/clock.h b/hwclock/clock.h
new file mode 100644
index 000000000..91d3df801
--- /dev/null
+++ b/hwclock/clock.h
@@ -0,0 +1,35 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h> /* for errno, EPERM, EINVAL, ENOENT */
+#include <time.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;
+#define TRUE 1
+#define FALSE 0
+
+/* hwclock.c */
+extern char *progname;
+extern int debug;
+extern int epoch_option;
+extern void outsyserr(char *msg, ...);
+
+/* 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);