mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 13:02:37 +07:00
There are some invalid condition checks in rtc.c, when rtc_file is missing, it should not consider that as a error and return, otherwise, it can lead to the case that time_set wont be called at all. With this fix, when both RTC and file restore fail, it will fall back to call time_set(NULL) and restore time from rtc_timestamp, this ensures the OS has a valid time at the very first boot. Signed-off-by: Ming Liu <liu.ming50@gmail.com>