From: Lennart Poettering Date: Thu, 12 Dec 2013 02:00:57 +0000 (+0100) Subject: timedated: make sure GetAll() succeeds in systems lacking /dev/rtc (such as containers) X-Git-Tag: v209~1010 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fe2b58a4ff8dc1cdf7081bd071bad8450db51423;p=elogind.git timedated: make sure GetAll() succeeds in systems lacking /dev/rtc (such as containers) --- diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c index 0a3f6b85f..9a42b051a 100644 --- a/src/libsystemd-bus/bus-util.c +++ b/src/libsystemd-bus/bus-util.c @@ -931,7 +931,8 @@ int bus_map_all_properties(sd_bus *bus, assert(path); assert(map); - r = sd_bus_call_method( bus, + r = sd_bus_call_method( + bus, destination, path, "org.freedesktop.DBus.Properties", diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index af2b0785c..e3421c24a 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