"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "rtc.c" between
chrony-3.1.tar.gz and chrony-3.2.tar.gz

About: Chrony is a pair of programs for maintaining the accuracy of computer clocks (via RFC1305 NTP servers or other sources).

rtc.c  (chrony-3.1):rtc.c  (chrony-3.2)
skipping to change at line 107 skipping to change at line 107
static void static void
apply_driftfile_time(time_t t) apply_driftfile_time(time_t t)
{ {
struct timespec now; struct timespec now;
LCL_ReadCookedTime(&now, NULL); LCL_ReadCookedTime(&now, NULL);
if (now.tv_sec < t) { if (now.tv_sec < t) {
if (LCL_ApplyStepOffset(now.tv_sec - t)) if (LCL_ApplyStepOffset(now.tv_sec - t))
LOG(LOGS_INFO, LOGF_Rtc, "System time restored from driftfile"); LOG(LOGS_INFO, "System time restored from driftfile");
} }
} }
/* ================================================== */ /* ================================================== */
void void
RTC_Initialise(int initial_set) RTC_Initialise(int initial_set)
{ {
time_t driftfile_time; time_t driftfile_time;
char *file_name; char *file_name;
skipping to change at line 145 skipping to change at line 145
} }
driver_initialised = 0; driver_initialised = 0;
/* This is how we tell whether the user wants to load the RTC /* This is how we tell whether the user wants to load the RTC
driver, if he is on a machine where it is an option. */ driver, if he is on a machine where it is an option. */
file_name = CNF_GetRtcFile(); file_name = CNF_GetRtcFile();
if (file_name) { if (file_name) {
if (CNF_GetRtcSync()) { if (CNF_GetRtcSync()) {
LOG_FATAL(LOGF_Rtc, "rtcfile directive cannot be used with rtcsync"); LOG_FATAL("rtcfile directive cannot be used with rtcsync");
} }
if (driver.init) { if (driver.init) {
if ((driver.init)()) { if ((driver.init)()) {
driver_initialised = 1; driver_initialised = 1;
} }
} else { } else {
LOG(LOGS_ERR, LOGF_Rtc, "RTC not supported on this operating system"); LOG(LOGS_ERR, "RTC not supported on this operating system");
} }
} }
} }
/* ================================================== */ /* ================================================== */
void void
RTC_Finalise(void) RTC_Finalise(void)
{ {
if (driver.fini) { if (driver.fini) {
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)