diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/hwclock.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/shared/hwclock.c b/src/shared/hwclock.c index a3b33ed4cc..837f51f947 100644 --- a/src/shared/hwclock.c +++ b/src/shared/hwclock.c @@ -47,15 +47,14 @@ static int rtc_open(int flags) { int fd; DIR *d; - /* 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; - + /* + * Some "chaotic platforms" have multiple RTCs and we need to + * find the "system RTC", which is in some setups /dev/rtc1. + * + * First, we try to find the RTC which has hctosys=1 set. If we + * don't find any we just take the first RTC that exists at all, + * then try to open /dev/rtc0. + */ d = opendir("/sys/class/rtc"); if (!d) goto fallback; |