diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2016-07-13 11:21:59 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-07-13 11:21:59 -0400 |
commit | 4347babbe3683e375e6217e55014264d446d7187 (patch) | |
tree | 9700eabbfc681d7f6d2d7caeec51138ffa89766e /ntpshmmon.c | |
parent | 2f857c2bb5d64d1d7f7be2c5d2c067b36f4c233e (diff) | |
download | gpsd-4347babbe3683e375e6217e55014264d446d7187.tar.gz |
Restore the original output format of ntpshmmon.
Changing the output format without bumping the version number was wrong.
Changing the output format without fixing the documentation and
examples (in INSTALL and elsewhere) was wrong.
Removing the 'sample' keyword at the beginning of the line was wrong.
It broke contrib/ntpshmviz. More generally, it broke the property
that the format was self-describing and extensible.
Removing the comment leader on the second line was wrong. That meant
parsers for the format, such as the one in contrib/ntpshmviz, would
try to interpret the header as data and throw errors.
Diffstat (limited to 'ntpshmmon.c')
-rw-r--r-- | ntpshmmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ntpshmmon.c b/ntpshmmon.c index fdb2e918..129a434b 100644 --- a/ntpshmmon.c +++ b/ntpshmmon.c @@ -85,7 +85,7 @@ int main(int argc, char **argv) } (void)printf("ntpshmmon version 1\n"); - (void)printf("Name Seen@ Clock Real L Prec\n"); + (void)printf("# Name Seen@ Clock Real L Prec\n"); do { /* the current segment */ @@ -114,7 +114,7 @@ int main(int argc, char **argv) } /* time stamp it */ clock_gettime(CLOCK_REALTIME, &shm_stat.tvc); - printf("%s %ld.%09ld %ld.%09ld %ld.%09ld %d %3d\n", + printf("sample %s %ld.%09ld %ld.%09ld %ld.%09ld %d %3d\n", ntp_name(i), (long)shm_stat.tvc.tv_sec, shm_stat.tvc.tv_nsec, (long)shm_stat.tvr.tv_sec, shm_stat.tvr.tv_nsec, |