mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:35:06 -05:00
sys: avoid syslog message when leap bits are not changed
After leap second the kernel removes STA_INS and STA_DEL bits from the adjtimex status automatically, don't report a change when clearing the bits.
This commit is contained in:
@@ -174,6 +174,15 @@ read_frequency(void)
|
||||
static void
|
||||
set_leap(int leap)
|
||||
{
|
||||
int current_leap;
|
||||
|
||||
if (TMX_GetLeap(¤t_leap) < 0) {
|
||||
LOG_FATAL(LOGF_SysLinux, "adjtimex() failed in set_leap");
|
||||
}
|
||||
|
||||
if (current_leap == leap)
|
||||
return;
|
||||
|
||||
if (TMX_SetLeap(leap) < 0) {
|
||||
LOG_FATAL(LOGF_SysLinux, "adjtimex() failed in set_leap");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user