summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock-rtc.c
diff options
context:
space:
mode:
authorJ William Piggott2017-07-15 19:56:01 +0200
committerJ William Piggott2017-07-16 14:41:54 +0200
commit1705066af503428104ae09e33b44baaf81a9e879 (patch)
treeb3f24327fec46bfb76e1fe384ca8fd33d36ffec9 /sys-utils/hwclock-rtc.c
parenthwclock: --epoch presence test fails (diff)
downloadkernel-qcow2-util-linux-1705066af503428104ae09e33b44baaf81a9e879.tar.gz
kernel-qcow2-util-linux-1705066af503428104ae09e33b44baaf81a9e879.tar.xz
kernel-qcow2-util-linux-1705066af503428104ae09e33b44baaf81a9e879.zip
hwclock: remove dead ioctl check
The epoch ioctls test hasn't been valid for 20 years (v2.1.88). RTC has returned ENOTTY for unimplemented ioctls for 15 years. The check is made for RTC_EPOCH_SET, but not for RTC_EPOCH_READ. They were both implemented at the same time. Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock-rtc.c')
-rw-r--r--sys-utils/hwclock-rtc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index 9d3e5b983..580356117 100644
--- a/sys-utils/hwclock-rtc.c
+++ b/sys-utils/hwclock-rtc.c
@@ -458,13 +458,7 @@ int set_epoch_rtc(const struct hwclock_control *ctl)
"with RTC_EPOCH_SET ioctl to %s.\n"), epoch,
rtc_dev_name);
if (ioctl(rtc_fd, RTC_EPOCH_SET, epoch) == -1) {
- if (errno == EINVAL)
- warnx(_("The kernel device driver for %s "
- "does not have the RTC_EPOCH_SET ioctl."),
- rtc_dev_name);
- else
- warn(_("ioctl(RTC_EPOCH_SET) to %s failed"),
- rtc_dev_name);
+ warn(_("ioctl(RTC_EPOCH_SET) to %s failed"), rtc_dev_name);
return 1;
}