aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/other/rtcwake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/rtcwake.c b/toys/other/rtcwake.c
index 161bd881..a382ee57 100644
--- a/toys/other/rtcwake.c
+++ b/toys/other/rtcwake.c
@@ -55,7 +55,7 @@ void rtcwake_main(void)
if (FLAG(u)) utc = 1;
else if (FLAG(l)) utc = 0;
- else utc = !!strstr(xreadfile("/etc/adjtime", toybuf, 2048), "UTC");
+ else utc = !readfile("/etc/adjtime", toybuf, 2048) || !!strstr(toybuf, "UTC");
if (FLAG(v)) xprintf("RTC time: %s\n", utc ? "UTC" : "local");
if (!TT.d) TT.d = "/dev/rtc0";