]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Convert the x86 RTC driver to use new validated BCD<->timespec conversions.
authorIan Lepore <ian@FreeBSD.org>
Mon, 15 Jan 2018 16:40:43 +0000 (16:40 +0000)
committerIan Lepore <ian@FreeBSD.org>
Mon, 15 Jan 2018 16:40:43 +0000 (16:40 +0000)
commit7c63e50188d0154012c0ecac9924970cb3951058
tree8551798869cf198af760e3fe78f7a5a27a9a9761
parentfc8ea4be2a7bad28c5e828cfa6522e4c9e21425d
Convert the x86 RTC driver to use new validated BCD<->timespec conversions.

New common routines were added to kern/subr_clock.c for converting between
calendrical time expressed in BCD and struct timespec. The new functions
return EINVAL on error, as expected when the clock hardware does not provide
valid time.

PR: 224813
Differential Revision: https://reviews.freebsd.org/D13731 (no reviewers)
sys/x86/isa/atrtc.c