Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2018 18:35:08 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r338594 - in stable/11/sys: dev/efidev kern
Message-ID:  <201809111835.w8BIZ88q093146@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Sep 11 18:35:08 2018
New Revision: 338594
URL: https://svnweb.freebsd.org/changeset/base/338594

Log:
  MFC r338435:
  Improve error messages from clock_if.m method failures.

Modified:
  stable/11/sys/dev/efidev/efirtc.c
  stable/11/sys/kern/subr_rtc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/efidev/efirtc.c
==============================================================================
--- stable/11/sys/dev/efidev/efirtc.c	Tue Sep 11 18:33:43 2018	(r338593)
+++ stable/11/sys/dev/efidev/efirtc.c	Tue Sep 11 18:35:08 2018	(r338594)
@@ -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");

Modified: stable/11/sys/kern/subr_rtc.c
==============================================================================
--- stable/11/sys/kern/subr_rtc.c	Tue Sep 11 18:33:43 2018	(r338593)
+++ stable/11/sys/kern/subr_rtc.c	Tue Sep 11 18:35:08 2018	(r338594)
@@ -136,6 +136,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)) {
@@ -148,7 +149,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809111835.w8BIZ88q093146>