chiark / gitweb /
util: use /dev/rtc symlink if possible before we go searching for a suitable device
authorLennart Poettering <lennart@poettering.net>
Mon, 23 Jan 2012 20:56:55 +0000 (21:56 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 23 Jan 2012 20:56:55 +0000 (21:56 +0100)
TODO
src/util.c

diff --git a/TODO b/TODO
index 3b4d45fb7c9bfbf133390f976f79de1187448704..f2e47e4bd513fc5b26a358b36fe978e53fb01987 100644 (file)
--- 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)
 
index 1babb6aed457060ed11f0e79636a29ffc4da8d84..c9ad831c6ca95fbad570f2640f919dcf2a0e4ebf 100644 (file)
@@ -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)