summaryrefslogtreecommitdiff
path: root/src/timedate/timedated.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-12 03:00:57 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-12 03:06:21 +0100
commitfe2b58a4ff8dc1cdf7081bd071bad8450db51423 (patch)
tree0b2126a6e5db562f246b4278e008f4ac422a2dd5 /src/timedate/timedated.c
parentd514feaa872820d5cb4e9321ad32673c09fbb3f4 (diff)
timedated: make sure GetAll() succeeds in systems lacking /dev/rtc (such as containers)
Diffstat (limited to 'src/timedate/timedated.c')
-rw-r--r--src/timedate/timedated.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index af2b0785cf..e3421c24a9 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -470,6 +470,9 @@ static int property_get_rtc_time(
if (r == -EBUSY) {
log_warning("/dev/rtc is busy, is somebody keeping it open continously? That's not a good idea... Returning a bogus RTC timestamp.");
t = 0;
+ } else if (r == -ENOENT) {
+ log_debug("Not /dev/rtc found.");
+ t = 0; /* no RTC found */
} else if (r < 0)
return sd_bus_error_set_errnof(error, r, "Failed to read RTC: %s", strerror(-r));
else