diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 10436f287..0c587957d 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1162,28 +1162,11 @@ manipulate_clock(const struct hwclock_control *ctl, const time_t set_time, return 0; } -/* - * Get or set the Hardware Clock epoch value in the kernel, as appropriate. - * , , and are hwclock invocation options. - * - * == -1 if the user did not specify an "epoch" option. +/** + * Get or set the kernel RTC driver's epoch on Alpha machines. + * ISA machines are hard coded for 1900. */ -#ifdef __linux__ -/* - * 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. - */ -# ifndef __alpha__ -static void -manipulate_epoch(const struct hwclock_control *ctl __attribute__((__unused__))) -{ - warnx(_("The kernel keeps an epoch value for the Hardware Clock " - "only on an Alpha machine.\nThis copy of hwclock was built for " - "a machine other than Alpha\n(and thus is presumably not running " - "on an Alpha now). No action taken.")); -} -# else +#if defined(__linux__) && defined(__alpha__) static void manipulate_epoch(const struct hwclock_control *ctl) { @@ -1210,8 +1193,7 @@ manipulate_epoch(const struct hwclock_control *ctl) ("Unable to set the epoch value in the kernel.\n")); } } -# endif /* __alpha__ */ -#endif /* __linux__ */ +#endif /* __linux__ __alpha__ */ static void out_version(void) { @@ -1251,7 +1233,7 @@ static void usage(const struct hwclock_control *ctl, const char *fmt, ...) " --systz set the system time based on the current timezone\n" " --adjust adjust the RTC to account for systematic drift since\n" " the clock was last set or adjusted\n"), usageto); -#ifdef __linux__ +#if defined(__linux__) && defined(__alpha__) fputs(_(" --getepoch print out the kernel's hardware clock epoch value\n" " --setepoch set the kernel's hardware clock epoch value to the \n" " value given with --epoch\n"), usageto); @@ -1267,9 +1249,10 @@ static void usage(const struct hwclock_control *ctl, const char *fmt, ...) #endif fprintf(usageto, _( " --directisa access the ISA bus directly instead of %s\n" - " --date