diff options
author | Karel Zak | 2017-11-23 10:30:27 +0100 |
---|---|---|
committer | Karel Zak | 2017-11-23 10:30:27 +0100 |
commit | 800e447741d108c0880018940f4f8e21705cf275 (patch) | |
tree | c40221cbca8611aa7ebb118bc8d735187d635610 /sys-utils/hwclock-rtc.c | |
parent | tests: update columns test due to dda229c7b2b16a31fae8e99079ab4f4ae5bc8eac (diff) | |
download | kernel-qcow2-util-linux-800e447741d108c0880018940f4f8e21705cf275.tar.gz kernel-qcow2-util-linux-800e447741d108c0880018940f4f8e21705cf275.tar.xz kernel-qcow2-util-linux-800e447741d108c0880018940f4f8e21705cf275.zip |
hwclock: revert ioctl test
This commit reverts 1d5cffa16a0183175684809cf215294ec20b8fd9.
(I did this revert manually as there was another changes in the code
and git-revert does not work in this case.)
Addresses: https://github.com/karelzak/util-linux/issues/543
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/hwclock-rtc.c')
-rw-r--r-- | sys-utils/hwclock-rtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c index 62e432937..cdd7d80d6 100644 --- a/sys-utils/hwclock-rtc.c +++ b/sys-utils/hwclock-rtc.c @@ -261,7 +261,7 @@ static int synchronize_to_clock_tick_rtc(const struct hwclock_control *ctl) * they should. */ rc = -1; - errno = ENOTTY; + errno = EINVAL; #else rc = ioctl(rtc_fd, RTC_UIE_ON, 0); #endif @@ -296,7 +296,7 @@ static int synchronize_to_clock_tick_rtc(const struct hwclock_control *ctl) if (rc == -1) warn(_("ioctl() to %s to turn off update interrupts failed"), rtc_dev_name); - } else if (errno == ENOTTY) { + } else if (errno == ENOTTY || errno == EINVAL) { /* rtc ioctl interrupts are unimplemented */ ret = busywait_for_rtc_clock_tick(ctl, rtc_fd); } else |