Skip to content

Commit 90a4df8

Browse files
committed
plugins: on error-retry, don't print "Restoring RTC" twice
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 146bf55 commit 90a4df8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/rtc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ static void rtc_restore(void *arg)
180180
rc = 2;
181181
}
182182

183-
print_desc(NULL, "Restoring system clock (UTC) from RTC");
183+
if (!rc)
184+
print_desc(NULL, "Restoring system clock (UTC) from RTC");
184185
tm.tm_isdst = -1; /* Use tzdata to figure it out, please. */
185186
tv.tv_sec = mktime(&tm);
186187
if (tv.tv_sec == (time_t)-1 || tv.tv_sec < rtc_date_fallback) {

0 commit comments

Comments
 (0)