Due to bug in older versions of hwclock, /etc/adjtime can contain
excessive drift value (up to many years per day). Prevent it
from applying.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
printf(_
("Not setting clock because last adjustment time is zero, "
"so history is bad."));
+ } else if (abs(adjtime_p->drift_factor) > MAX_DRIFT) {
+ if (debug)
+ printf(_("Not setting clock because drift factor %f is far too high.\n"),
+ adjtime_p->drift_factor);
} else {
int adjustment;
/* Number of seconds we must insert in the Hardware Clock */