diff options
Diffstat (limited to 'hwclock')
-rw-r--r-- | hwclock/hwclock.8 | 4 | ||||
-rw-r--r-- | hwclock/kd.c | 43 |
2 files changed, 20 insertions, 27 deletions
diff --git a/hwclock/hwclock.8 b/hwclock/hwclock.8 index 8c6b2406..831618ed 100644 --- a/hwclock/hwclock.8 +++ b/hwclock/hwclock.8 @@ -631,5 +631,5 @@ program by Charles Hedrick, Rob Hooft, and Harald Koenig. See the source code for complete history and credits. .SH AVAILABILITY -The hwclock command is part of the util-linux-ng package and is available from -ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. +The hwclock command is part of the util-linux package and is available from +ftp://ftp.kernel.org/pub/linux/utils/util-linux/. diff --git a/hwclock/kd.c b/hwclock/kd.c index 3da87caf..66ff579b 100644 --- a/hwclock/kd.c +++ b/hwclock/kd.c @@ -2,14 +2,7 @@ #include "clock.h" -#ifndef __m68k__ - -struct clock_ops * -probe_for_kd_clock() { - return NULL; -} - -#else /* __m68k__ */ +#ifdef __m68k__ #include <unistd.h> /* for close() */ #include <fcntl.h> /* for O_RDONLY */ @@ -19,26 +12,26 @@ probe_for_kd_clock() { #include "nls.h" #include "usleep.h" -static int con_fd = -1; /* opened by probe_for_kd_clock() */ - /* never closed */ -static char *con_fd_filename; /* usually "/dev/tty1" */ - /* Get defines for KDGHWCLK and KDSHWCLK (m68k) */ #include <linux/kd.h> -#ifndef KDGHWCLK -#define KDGHWCLK 0x4B50 /* get hardware clock */ -#define KDSHWCLK 0x4B51 /* set hardware clock */ -struct hwclk_time { - unsigned sec; /* 0..59 */ - unsigned min; /* 0..59 */ - unsigned hour; /* 0..23 */ - unsigned day; /* 1..31 */ - unsigned mon; /* 0..11 */ - unsigned year; /* 70... */ - int wday; /* 0..6, 0 is Sunday, -1 means unknown/don't set */ -}; + +/* Even on m68k, if KDGHWCLK (antique) is not defined, don't build this */ + #endif +#if !defined(__m68k__) || !defined(KDGHWCLK) + +struct clock_ops * +probe_for_kd_clock() { + return NULL; +} + +#else /* __m68k__ && KDGHWCLK */ + +static int con_fd = -1; /* opened by probe_for_kd_clock() */ + /* never closed */ +static char *con_fd_filename; /* usually "/dev/tty1" */ + static int synchronize_to_clock_tick_kd(void) { /*---------------------------------------------------------------------------- @@ -183,4 +176,4 @@ probe_for_kd_clock() { } return ret; } -#endif /* __m68k__ */ +#endif /* __m68k__ && KDGHWCLK */ |