]> git.ipfire.org Git - thirdparty/util-linux.git/commit
hwclock: report rtc open() errors on --verbose
authorKarel Zak <kzak@redhat.com>
Mon, 7 Oct 2019 10:57:43 +0000 (12:57 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Oct 2019 10:57:43 +0000 (12:57 +0200)
commitb3fc2a3c33905cc6871f99334e56221478d2609c
treed1cd9e90c199548ddf7ffa338b043bf0e008de66
parent6bebea1b13991157552f8da3fa98c7a3a0eda0dc
hwclock: report rtc open() errors on --verbose

Let's be more verbose and provide real open() error to make
debugging easier on --verbose.

For example:

$ hwclock --verbose
hwclock from util-linux 2.34.193-6bebea-dirty
System Time: 1570445823.701266
Trying to open: /dev/rtc0
hwclock: cannot open /dev/rtc0: Permission denied          <---
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Addresses: https://github.com/karelzak/util-linux/issues/879
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock-rtc.c
sys-utils/hwclock.c