summaryrefslogtreecommitdiff
path: root/src/sleep
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-24 12:40:07 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-24 12:44:20 +0200
commitc16669a3094fc37e8d4fc815fcb6180a094d8ceb (patch)
treeeb06a9798e63eb803fbc0a25136ae70bc9c16f36 /src/sleep
parent6ce63245f6167551f85be9d6582c613e64d18680 (diff)
downloadsystemd-c16669a3094fc37e8d4fc815fcb6180a094d8ceb.tar.gz
sleep: rename read_wakealarm() → rtc_read_time()
It doesn't read wakealarm, but the current time of the RTC. Hence, let's rename this to make it less misleading.
Diffstat (limited to 'src/sleep')
-rw-r--r--src/sleep/sleep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index a651870641..f9b822bd93 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -188,7 +188,7 @@ static int execute(char **modes, char **states) {
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;
@@ -196,7 +196,7 @@ static int read_wakealarm(uint64_t *result) {
if (r < 0)
return r;
- return safe_atou64(t, result);
+ return safe_atou64(t, ret_sec);
}
static int write_wakealarm(const char *str) {
@@ -225,7 +225,7 @@ static int execute_s2h(usec_t hibernate_delay_sec) {
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);
@@ -242,7 +242,7 @@ static int execute_s2h(usec_t hibernate_delay_sec) {
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);