svn commit: r299064 - head/sys/kern
Roger Pau Monné
royger at FreeBSD.org
Wed May 4 13:49:01 UTC 2016
Author: royger
Date: Wed May 4 13:48:59 2016
New Revision: 299064
URL: https://svnweb.freebsd.org/changeset/base/299064
Log:
rtc: fix inverted resolution check
The current code in clock_register checks if the newly added clock has a
resolution value higher than the current one in order to make it the
default, which is wrong. Clocks with a lower resolution value should be
better than ones with a higher resolution value, in fact with the current
code FreeBSD is always selecting the worse clock.
Reviewed by: kib jhb jkim
Sponsored by: Citrix Systems R&D
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D6185
Modified:
head/sys/kern/subr_rtc.c
Modified: head/sys/kern/subr_rtc.c
==============================================================================
--- head/sys/kern/subr_rtc.c Wed May 4 12:51:27 2016 (r299063)
+++ head/sys/kern/subr_rtc.c Wed May 4 13:48:59 2016 (r299064)
@@ -84,7 +84,7 @@ clock_register(device_t dev, long res) /
{
if (clock_dev != NULL) {
- if (clock_res > res) {
+ if (clock_res <= res) {
if (bootverbose)
device_printf(dev, "not installed as "
"time-of-day clock: clock %s has higher "
More information about the svn-src-head
mailing list