diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
commit | d0b2f91bede3bd5e3d24dd6803e56eee959c1797 (patch) | |
tree | 7fee4ab0509879c373c4f2cbd5b8a5be5b4041ee /tools/testing/selftests/timers/rtctest.c | |
parent | e914f8eb445e8f74b00303c19c2ffceaedd16a05 (diff) |
Linux-libre 4.8.2-gnupck-4.8.2-gnu
Diffstat (limited to 'tools/testing/selftests/timers/rtctest.c')
-rw-r--r-- | tools/testing/selftests/timers/rtctest.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c index 624bce51b..4230d3052 100644 --- a/tools/testing/selftests/timers/rtctest.c +++ b/tools/testing/selftests/timers/rtctest.c @@ -144,11 +144,12 @@ test_READ: retval = ioctl(fd, RTC_ALM_SET, &rtc_tm); if (retval == -1) { - if (errno == ENOTTY) { + if (errno == EINVAL) { fprintf(stderr, "\n...Alarm IRQs not supported.\n"); goto test_PIE; } + perror("RTC_ALM_SET ioctl"); exit(errno); } @@ -166,6 +167,12 @@ test_READ: /* Enable alarm interrupts */ retval = ioctl(fd, RTC_AIE_ON, 0); if (retval == -1) { + if (errno == EINVAL) { + fprintf(stderr, + "\n...Alarm IRQs not supported.\n"); + goto test_PIE; + } + perror("RTC_AIE_ON ioctl"); exit(errno); } @@ -193,7 +200,7 @@ test_PIE: retval = ioctl(fd, RTC_IRQP_READ, &tmp); if (retval == -1) { /* not all RTCs support periodic IRQs */ - if (errno == ENOTTY) { + if (errno == EINVAL) { fprintf(stderr, "\nNo periodic IRQ support\n"); goto done; } @@ -211,7 +218,7 @@ test_PIE: retval = ioctl(fd, RTC_IRQP_SET, tmp); if (retval == -1) { /* not all RTCs can change their periodic IRQ rate */ - if (errno == ENOTTY) { + if (errno == EINVAL) { fprintf(stderr, "\n...Periodic IRQ rate is fixed\n"); goto done; |