mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-27 01:20:00 +07:00
util: use /dev/rtc symlink if possible before we go searching for a suitable device
This commit is contained in:
parent
c97e8d10fe
commit
7c69716810
2
TODO
2
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)
|
||||
|
||||
|
10
src/util.c
10
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)
|
||||
|
Loading…
Reference in New Issue
Block a user