mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 19:15:07 -05:00
Add rtcsync directive
The directive enables the 11 minute kernel mode. It cannot be used when the normal RTC tracking is enabled.
This commit is contained in:
21
conf.c
21
conf.c
@@ -90,6 +90,7 @@ static void parse_cmdallow(const char *);
|
||||
static void parse_cmddeny(const char *);
|
||||
static void parse_cmdport(const char *);
|
||||
static void parse_rtconutc(const char *);
|
||||
static void parse_rtcsync(const char *);
|
||||
static void parse_noclientlog(const char *);
|
||||
static void parse_clientloglimit(const char *);
|
||||
static void parse_fallbackdrift(const char *);
|
||||
@@ -150,6 +151,9 @@ static int enable_manual=0;
|
||||
incl. daylight saving). */
|
||||
static int rtc_on_utc = 0;
|
||||
|
||||
/* Flag set if the RTC should be automatically synchronised by kernel */
|
||||
static int rtc_sync = 0;
|
||||
|
||||
/* Limit and threshold for clock stepping */
|
||||
static int make_step_limit = 0;
|
||||
static double make_step_threshold = 0.0;
|
||||
@@ -235,6 +239,7 @@ static const Command commands[] = {
|
||||
{"cmddeny", 7, parse_cmddeny},
|
||||
{"cmdport", 7, parse_cmdport},
|
||||
{"rtconutc", 8, parse_rtconutc},
|
||||
{"rtcsync", 7, parse_rtcsync},
|
||||
{"noclientlog", 11, parse_noclientlog},
|
||||
{"clientloglimit", 14, parse_clientloglimit},
|
||||
{"fallbackdrift", 13, parse_fallbackdrift},
|
||||
@@ -784,6 +789,14 @@ parse_rtconutc(const char *line)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
static void
|
||||
parse_rtcsync(const char *line)
|
||||
{
|
||||
rtc_sync = 1;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
static void
|
||||
parse_noclientlog(const char *line)
|
||||
{
|
||||
@@ -1394,6 +1407,14 @@ CNF_GetRTCOnUTC(void)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
CNF_GetRTCSync(void)
|
||||
{
|
||||
return rtc_sync;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
CNF_GetMakeStep(int *limit, double *threshold)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user