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>
* they should.
*/
rc = -1;
- errno = ENOTTY;
+ errno = EINVAL;
#else
rc = ioctl(rtc_fd, RTC_UIE_ON, 0);
#endif
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