[systemd-commits] TODO src/util.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Jan 23 12:57:16 PST 2012


 TODO       |    2 +-
 src/util.c |   10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 7c697168102cb64c5cb65a542959684014da99c7
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jan 23 21:56:55 2012 +0100

    util: use /dev/rtc symlink if possible before we go searching for a suitable device

diff --git a/TODO b/TODO
index 3b4d45f..f2e47e4 100644
--- a/TODO
+++ b/TODO
@@ -113,7 +113,7 @@ Features:
 
 * readahead: check whether a btrfs volume includes ssd by checking mount flag "ssd"
 
-* support sd_notify() style notification when reload begins (RELOADING=1), reload is finished (READY=1)
+* support sd_notify() style notification when reload begins (RELOADING=1), reload is finished (READY=1), and add ReloadSignal= then to use in combination
 
 * support sd_notify() style notification when shutting down, to make auto-exit bus services work (STOPPING=1)
 
diff --git a/src/util.c b/src/util.c
index 1babb6a..c9ad831 100644
--- a/src/util.c
+++ b/src/util.c
@@ -5235,8 +5235,14 @@ int rtc_open(int flags) {
         int fd;
         DIR *d;
 
-        /* We open the first RTC which has hctosys=1 set. If we don't
-         * find any we just take the first one */
+        /* First, we try to make use of the /dev/rtc symlink. If that
+         * doesn't exist, we open the first RTC which has hctosys=1
+         * set. If we don't find any we just take the first RTC that
+         * exists at all. */
+
+        fd = open("/dev/rtc", flags);
+        if (fd >= 0)
+                return fd;
 
         d = opendir("/sys/class/rtc");
         if (!d)



More information about the systemd-commits mailing list