From 72fc8ca062f538413419f6b282827dbd5e6a7b06 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 21 Sep 2012 12:05:12 +0200 Subject: hwclock: wait time in hwclock is not long enough for some ARM devices 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 --- sys-utils/hwclock-rtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys-utils/hwclock-rtc.c') diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c index 338094190..779051d85 100644 --- a/sys-utils/hwclock-rtc.c +++ b/sys-utils/hwclock-rtc.c @@ -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; -- cgit v1.2.3-55-g7522