rtc: fix setting time from driftfile when RTC reading fails

Fix RTC_Linux_TimePreInit() to return 0 when the RTC device can be
opened, but reading its time fails to at least have the time restored
from the driftfile.
This commit is contained in:
Miroslav Lichvar 2015-09-03 11:30:09 +02:00
parent 67ce6bd279
commit 7d6de7afe6

View file

@ -1051,6 +1051,8 @@ RTC_Linux_TimePreInit(void)
LOG(LOGS_WARN, LOGF_RtcLinux, "Could not convert RTC reading to seconds since 1/1/1970");
return 0;
}
} else {
return 0;
}
return 1;