mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
rtc: move preinit call to RTC_Initialise()
This commit is contained in:
20
rtc.c
20
rtc.c
@@ -74,10 +74,16 @@ static struct {
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
RTC_Initialise(void)
|
||||
RTC_Initialise(int initial_set)
|
||||
{
|
||||
char *file_name;
|
||||
|
||||
/* Do an initial read of the RTC and set the system time to it. This
|
||||
is analogous to what /sbin/hwclock -s would do on Linux. */
|
||||
if (initial_set && driver.time_pre_init) {
|
||||
(driver.time_pre_init)();
|
||||
}
|
||||
|
||||
driver_initialised = 0;
|
||||
|
||||
/* This is how we tell whether the user wants to load the RTC
|
||||
@@ -130,18 +136,6 @@ RTC_TimeInit(void (*after_hook)(void *), void *anything)
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
/* Do an initial read of the RTC and set the system time to it. This
|
||||
is analogous to what /sbin/hwclock -s would do on Linux. */
|
||||
|
||||
void
|
||||
RTC_TimePreInit(void)
|
||||
{
|
||||
if (driver.time_pre_init) {
|
||||
(driver.time_pre_init)();
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
/* Start the RTC measurement process */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user