mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 17:05:07 -05:00
Support Linux 3.0 and later
This commit is contained in:
18
sys_linux.c
18
sys_linux.c
@@ -960,7 +960,9 @@ get_version_specific_details(void)
|
|||||||
if (uname(&uts) < 0) {
|
if (uname(&uts) < 0) {
|
||||||
LOG_FATAL(LOGF_SysLinux, "Cannot uname(2) to get kernel version, sorry.");
|
LOG_FATAL(LOGF_SysLinux, "Cannot uname(2) to get kernel version, sorry.");
|
||||||
}
|
}
|
||||||
if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) != 3) {
|
|
||||||
|
patch = 0;
|
||||||
|
if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) < 2) {
|
||||||
LOG_FATAL(LOGF_SysLinux, "Cannot read information from uname, sorry");
|
LOG_FATAL(LOGF_SysLinux, "Cannot read information from uname, sorry");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1039,21 +1041,21 @@ get_version_specific_details(void)
|
|||||||
half-second intervals. */
|
half-second intervals. */
|
||||||
tick_update_hz = 2;
|
tick_update_hz = 2;
|
||||||
}
|
}
|
||||||
/* Let's be optimistic that these will be the same until proven
|
/* fall through */
|
||||||
otherwise :-) */
|
default:
|
||||||
case 7:
|
|
||||||
case 8:
|
|
||||||
/* These don't seem to need scaling */
|
/* These don't seem to need scaling */
|
||||||
freq_scale = 1.0;
|
freq_scale = 1.0;
|
||||||
have_readonly_adjtime = 2;
|
have_readonly_adjtime = 2;
|
||||||
have_nanopll = 1;
|
have_nanopll = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
LOG_FATAL(LOGF_SysLinux, "Kernel version not supported yet, sorry.");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_FATAL(LOGF_SysLinux, "Kernel's major version not supported yet, sorry");
|
/* Let's be optimistic that these will be the same until proven
|
||||||
|
otherwise :-) */
|
||||||
|
freq_scale = 1.0;
|
||||||
|
have_readonly_adjtime = 2;
|
||||||
|
have_nanopll = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user