mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
sys: allow drivers to fail when applying step offset
Different systems may consider different time values to be valid. Don't exit on settimeofday()/adjtimex() error in case the check in UTI_IsTimeOffsetSane() isn't restrictive enough.
This commit is contained in:
@@ -100,12 +100,15 @@ our_round(double x)
|
||||
/* ================================================== */
|
||||
/* Positive means currently fast of true time, i.e. jump backwards */
|
||||
|
||||
static void
|
||||
static int
|
||||
apply_step_offset(double offset)
|
||||
{
|
||||
if (TMX_ApplyStepOffset(-offset) < 0) {
|
||||
LOG_FATAL(LOGF_SysLinux, "adjtimex() failed");
|
||||
DEBUG_LOG(LOGF_SysLinux, "adjtimex() failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
Reference in New Issue
Block a user