]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: wait time in hwclock is not long enough for some ARM devices
authorKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 10:05:12 +0000 (12:05 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 10:05:12 +0000 (12:05 +0200)
On Sun, Sep 16, 2012 at 02:11:48PM +0800, Queen Adam wrote:
> I'm using Archlinux ARM for my Melo A100 box.
> The hwclock always timeout when using select() in rtc.c.
>
> After I change the timeout from 5 to 10, the problem is solved.
>
> In fact the timeout in my ARM box seems only to be a little larger
> than 5s.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock-rtc.c

index 33809419088f8d8871cba1e36523dfbff67331e5..779051d85dd665790c714e2fe09905072782120a 100644 (file)
@@ -303,12 +303,12 @@ static int synchronize_to_clock_tick_rtc(void)
                        struct timeval tv;
 
                        /*
-                        * Wait up to five seconds for the next update
+                        * Wait up to ten seconds for the next update
                         * interrupt
                         */
                        FD_ZERO(&rfds);
                        FD_SET(rtc_fd, &rfds);
-                       tv.tv_sec = 5;
+                       tv.tv_sec = 10;
                        tv.tv_usec = 0;
                        rc = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);
                        ret = 1;