aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/efidev/efirtc.c3
-rw-r--r--sys/kern/subr_rtc.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/efidev/efirtc.c b/sys/dev/efidev/efirtc.c
index b9e06bcc362e..e5a2ec262bf5 100644
--- a/sys/dev/efidev/efirtc.c
+++ b/sys/dev/efidev/efirtc.c
@@ -74,7 +74,8 @@ efirtc_probe(device_t dev)
*/
if ((error = efi_get_time(&tm)) != 0) {
if (bootverbose)
- device_printf(dev, "cannot read EFI realtime clock\n");
+ device_printf(dev, "cannot read EFI realtime clock, "
+ "error %d\n", error);
return (error);
}
device_set_desc(dev, "EFI Realtime Clock");
diff --git a/sys/kern/subr_rtc.c b/sys/kern/subr_rtc.c
index 82c276f210a2..1c3a9804694c 100644
--- a/sys/kern/subr_rtc.c
+++ b/sys/kern/subr_rtc.c
@@ -138,6 +138,7 @@ settime_task_func(void *arg, int pending)
{
struct timespec ts;
struct rtc_instance *rtc;
+ int error;
rtc = arg;
if (!(rtc->flags & CLOCKF_SETTIME_NO_TS)) {
@@ -150,7 +151,9 @@ settime_task_func(void *arg, int pending)
ts.tv_sec = 0;
ts.tv_nsec = 0;
}
- CLOCK_SETTIME(rtc->clockdev, &ts);
+ error = CLOCK_SETTIME(rtc->clockdev, &ts);
+ if (error != 0 && bootverbose)
+ device_printf(rtc->clockdev, "CLOCK_SETTIME error %d\n", error);
}
static void