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:
Miroslav Lichvar
2010-05-14 14:41:11 +02:00
parent 5fb0a9d53b
commit a080d00352
8 changed files with 74 additions and 10 deletions

21
conf.c
View File

@@ -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)
{