return r;
}
-static int read_wakealarm(uint64_t *result) {
+static int rtc_read_time(uint64_t *ret_sec) {
_cleanup_free_ char *t = NULL;
int r;
if (r < 0)
return r;
- return safe_atou64(t, result);
+ return safe_atou64(t, ret_sec);
}
static int write_wakealarm(const char *str) {
if (r < 0)
return r;
- r = read_wakealarm(&orig_time);
+ r = rtc_read_time(&orig_time);
if (r < 0)
return log_error_errno(r, "Failed to read time: %d", r);
if (r < 0)
return r;
- r = read_wakealarm(&cmp_time);
+ r = rtc_read_time(&cmp_time);
if (r < 0)
return log_error_errno(r, "Failed to read time: %d", r);