]> err.no Git - util-linux/commit
hwclock: check for ENODEV
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 4 Dec 2007 13:44:05 +0000 (14:44 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 5 Dec 2007 10:43:57 +0000 (11:43 +0100)
commit833dd2913e940a9ce4589730086b124697e92d7a
tree8248e36acc9e464f141a6e808b107292ef848292
parentcd93e3f76272de50592a0eb7c343c65a803ef6d5
hwclock: check for ENODEV

/sbin/hwclock is supposed to fall back to using /dev/rtc0 if /dev/rtc isn't
working (which it isn't, because mkinitrd creates it with the old device
numbers, and we're switching to the new RTC_CLASS driver).

Unfortunately, it'll only cope if the error it gets is ENOENT (i.e. the device
node doesn't exist). It doesn't fall back to the next device in the list if the
error is ENODEV, which is what happens when the device node exists, but there's
no driver.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
hwclock/rtc.c