Commit 5b7eef7
committed
plugins:rtc.c: drop some invalid condition checks
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>1 parent 6f6267f commit 5b7eef7
1 file changed
+5
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | 176 | | |
182 | 177 | | |
183 | 178 | | |
| |||
190 | 185 | | |
191 | 186 | | |
192 | 187 | | |
193 | | - | |
194 | | - | |
| 188 | + | |
195 | 189 | | |
196 | 190 | | |
| 191 | + | |
| 192 | + | |
197 | 193 | | |
198 | | - | |
| 194 | + | |
199 | 195 | | |
200 | 196 | | |
201 | 197 | | |
| |||
292 | 288 | | |
293 | 289 | | |
294 | 290 | | |
295 | | - | |
296 | | - | |
| 291 | + | |
297 | 292 | | |
298 | 293 | | |
299 | 294 | | |
| |||
0 commit comments