summaryrefslogtreecommitdiffstats
path: root/hwclock/rtc.c
diff options
context:
space:
mode:
authorKarel Zak2008-08-13 11:47:10 +0200
committerKarel Zak2008-08-13 11:47:10 +0200
commit55a4a75ca09173264a622a1e0b7e0537806ed526 (patch)
treef2a446d04a70f1a27d63743b14c2a97306bf0aeb /hwclock/rtc.c
parenthwclock: delay loop in set_hardware_clock_exact (diff)
downloadkernel-qcow2-util-linux-55a4a75ca09173264a622a1e0b7e0537806ed526.tar.gz
kernel-qcow2-util-linux-55a4a75ca09173264a622a1e0b7e0537806ed526.tar.xz
kernel-qcow2-util-linux-55a4a75ca09173264a622a1e0b7e0537806ed526.zip
hwclock: read_hardware_clock_rtc() need to return error codes
We shouldn't ignore RTC_RD_TIME/RTCGET error codes. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'hwclock/rtc.c')
-rw-r--r--hwclock/rtc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hwclock/rtc.c b/hwclock/rtc.c
index e59414fde..7ec5362e8 100644
--- a/hwclock/rtc.c
+++ b/hwclock/rtc.c
@@ -295,15 +295,15 @@ int ret;
static int
read_hardware_clock_rtc(struct tm *tm) {
- int rtc_fd;
+ int rtc_fd, rc;
rtc_fd = open_rtc_or_exit();
/* Read the RTC time/date, return answer via tm */
- do_rtc_read_ioctl(rtc_fd, tm);
+ rc = do_rtc_read_ioctl(rtc_fd, tm);
close(rtc_fd);
- return 0;
+ return rc;
}