lkml.org 
[lkml]   [2016]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject<sys/timex.h> and NTP incompatibility (MOD_NANO)
Hi folks!

I'd wish ntp_loopfilter.c would compile without problems. The mess is (I had fixed it about 15 years ago (keyword "PPSkit")) that Linux uses ADJ_* flags to do traditional adjtime() things, as well as NTP kernel-related things (That's why the Linux syscall is named adjtimex()).
NTP however expects the flags to have names like MOD_* to modify settings, and STA_* for status bits to test.

When <sys/timex.h>lacks a MOD_NANO, but has a STA_NANO, compilation of ntpd/ntp_loopfilter.c fails.

I'd wish this to be fixed. I don't know which "Bonehead weakener" is needed to get the fix permanently into Linux.

My proposal many years ago was to use ADJ_* style flags only for the Linux specialities (the adjtime() part of adjtimex()), and use the MOD_* style flags for the NTP part of adjtimex().

Regards,
Ulrich
---
Appendix: Linux has only these:
/* xntp 3.4 compatibility names */
#define MOD_OFFSET ADJ_OFFSET
#define MOD_FREQUENCY ADJ_FREQUENCY
#define MOD_MAXERROR ADJ_MAXERROR
#define MOD_ESTERROR ADJ_ESTERROR
#define MOD_STATUS ADJ_STATUS
#define MOD_TIMECONST ADJ_TIMECONST
#define MOD_CLKB ADJ_TICK
#define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */





\
 
 \ /
  Last update: 2016-02-01 09:01    [W:0.038 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site