]> git.ipfire.org Git - thirdparty/util-linux.git/blob - clock/clock.h
Imported from util-linux-2.10m tarball.
[thirdparty/util-linux.git] / clock / clock.h
1 #include <stdio.h>
2 #include <string.h>
3 #include <errno.h> /* for errno, EPERM, EINVAL, ENOENT */
4 #include <time.h>
5
6 struct clock_ops {
7 char *interface_name;
8 int (*get_permissions)(void);
9 int (*read_hardware_clock)(struct tm *tm);
10 int (*set_hardware_clock)(const struct tm *tm);
11 int (*synchronize_to_clock_tick)(void);
12 };
13
14 extern struct clock_ops *probe_for_cmos_clock(void);
15 extern struct clock_ops *probe_for_rtc_clock(void);
16 extern struct clock_ops *probe_for_kd_clock(void);
17
18 typedef int bool;
19 #define TRUE 1
20 #define FALSE 0
21
22 /* hwclock.c */
23 extern char *progname;
24 extern int debug;
25 extern int epoch_option;
26 extern void outsyserr(char *msg);
27
28 /* cmos.c */
29 extern void set_cmos_epoch(int ARCconsole, int SRM);
30 extern void set_cmos_access(int Jensen, int funky_toy);
31
32 /* rtc.c */
33 extern int get_epoch_rtc(unsigned long *epoch, int silent);
34 extern int set_epoch_rtc(unsigned long epoch);