[PATCH 2/4] hwclock: remove dead ioctl check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 sys-utils/hwclock-rtc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index 9d3e5b9..5803561 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;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux