summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.h
diff options
context:
space:
mode:
authorJ William Piggott2017-04-18 00:39:56 +0200
committerJ William Piggott2017-04-19 04:39:05 +0200
commit039a0ceccf11f293ce9db96cc9f556f861505e6e (patch)
treeca21b469b2cb04403012dffd222036d136b8270b /sys-utils/hwclock.h
parenthwclock: improve default function handling (diff)
downloadkernel-qcow2-util-linux-039a0ceccf11f293ce9db96cc9f556f861505e6e.tar.gz
kernel-qcow2-util-linux-039a0ceccf11f293ce9db96cc9f556f861505e6e.tar.xz
kernel-qcow2-util-linux-039a0ceccf11f293ce9db96cc9f556f861505e6e.zip
hwclock: make epoch functions alpha only
It's been 19.1315 years since the comment below was written and the kernel has actually gone further away from allowing an RTC epoch on ISA machines. /* * Maintenance note: This should work on non-Alpha machines, but the * evidence today (98.03.04) indicates that the kernel only keeps the epoch * value on Alphas. If that is ever fixed, this function should be changed. */ The current behavior is to accept the epoch options on ISA machines only to print a lengthy message explaining that you cannot use them. This patch removes that behavior, making the epoch functions truly Alpha only, as the man-page states that they are. * sys-utils/hwclock.c: make epoch function alpha only. * sys-utils/hwclock.h: same. Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock.h')
-rw-r--r--sys-utils/hwclock.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
index 37e817314..7830ef60a 100644
--- a/sys-utils/hwclock.h
+++ b/sys-utils/hwclock.h
@@ -17,8 +17,10 @@ enum {
struct hwclock_control {
char *date_opt;
- unsigned long epoch_option;
char *adj_file_name;
+#if defined(__linux__) && defined(__alpha__)
+ unsigned long epoch_option;
+#endif
#ifdef __linux__
char *rtc_dev_name;
#endif
@@ -32,7 +34,7 @@ struct hwclock_control {
hctosys:1,
utc:1,
systohc:1,
-#ifdef __linux__
+#if defined(__linux__) && defined(__alpha__)
getepoch:1,
setepoch:1,
#endif
@@ -67,8 +69,10 @@ extern unsigned long epoch_option;
extern double time_diff(struct timeval subtrahend, struct timeval subtractor);
/* rtc.c */
+#if defined(__linux__) && defined(__alpha__)
extern int get_epoch_rtc(const struct hwclock_control *ctl, unsigned long *epoch);
extern int set_epoch_rtc(const struct hwclock_control *ctl);
+#endif
extern void hwclock_exit(const struct hwclock_control *ctl, int status);