MRU update status
Hal Murray
hmurray at megapathdsl.net
Mon Dec 26 23:16:52 UTC 2016
I have an cleaned up version of the allocator mostly working.
My current problem is that I need to fix ntpq to not give up if it asks for a
slot that that ntpd doesn't support. Can you either fix it, or give me some
guidance on where the fix should go?
You can test with "rv 0 leap,foo" and/or hacking in a bogus slot in one of
the tables such as the one used for monlist.
I'd be happy if it either skipped printing slots that don't exist, or printed
something conspicuous like "foo: ???" to indicate that the server doesn't
support that named value.
----------
There is another area that could use some TCL. ntp_control has several
tables that need to be kept in sync with some #define-s. It's things like:
#define CS_LEAP 1
#define CS_STRATUM 2
static const struct ctl_var sys_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CS_LEAP, RW, "leap" }, /* 1 */
{ CS_STRATUM, RO, "stratum" }, /* 2 */
{ CS_PRECISION, RO, "precision" }, /* 3 */
The problem is that they are long and there is no checking so it's easy to
screwup. It's also a pain to add a new one. You can either append it so the
editing is easy or insert it in the appropriate place and risk botching the
long chain of bump-by-1 edits that need to be done in two places.
Nobody cares what the value of CS_LEAP is, but the slot for it has to be at
that offset in the table.
We should be able to come up with a macro that will both assign the next tag
value and build a slot. Have you done that before? (Or know why it won't
work, or ...)
--
These are my opinions. I hate spam.
More information about the devel
mailing list