diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 00:46:29 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 00:49:21 -0500 |
commit | 02c9c43a3aaaf73f84fdf9fbc96e9a32e546d273 (patch) | |
tree | 36a2a1be1db9e495e43f2d3b091bfb97d93dfcc4 /ntpshmmon.c | |
parent | 8e2682c26186af8fcdc48b4fc8a02685a0ccc6a1 (diff) | |
download | gpsd-02c9c43a3aaaf73f84fdf9fbc96e9a32e546d273.tar.gz |
Begin factoring out ntplib.
All knowledge of the ntpd SHM format is now confined to the three
files ntpshm.h, ntpshmread.c, and ntpshmwrite.c.
No logic changes. All regression tests pass. PPS works on GR-601W.
Diffstat (limited to 'ntpshmmon.c')
-rw-r--r-- | ntpshmmon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ntpshmmon.c b/ntpshmmon.c index f272ebd2..38447960 100644 --- a/ntpshmmon.c +++ b/ntpshmmon.c @@ -84,7 +84,7 @@ int main(int argc, char **argv) struct shm_stat_t shm_stat; for (i = 0; i < NTPSEGMENTS; i++) { - enum segstat_t status = shm_query(segments[i], &shm_stat, false); + enum segstat_t status = ntp_read(segments[i], &shm_stat, false); if (verbose) fprintf(stderr, "unit %d status %d\n", i, status); switch(status) @@ -94,7 +94,7 @@ int main(int argc, char **argv) /*@-type@*//* splint is confused about struct timespec */ if (shm_stat.tvc.tv_sec != tick[i].tv_sec || shm_stat.tvc.tv_nsec != tick[i].tv_nsec) { printf("sample %s %ld.%09ld %ld.%09ld %ld.%09ld %d %3d\n", - shm_name(i), + ntp_name(i), shm_stat.tvc.tv_sec, shm_stat.tvc.tv_nsec, shm_stat.tvr.tv_sec, shm_stat.tvr.tv_nsec, shm_stat.tvt.tv_sec, shm_stat.tvt.tv_nsec, @@ -113,7 +113,7 @@ int main(int argc, char **argv) case BAD_MODE: /*@-mustfreefresh@*/ fprintf(stderr, "ntpshmmon: unknown mode %d on segment %s\n", - shm_stat.status, shm_name(i)); + shm_stat.status, ntp_name(i)); /*@+mustfreefresh@*/ break; case CLASH: @@ -122,7 +122,7 @@ int main(int argc, char **argv) default: /*@-mustfreefresh@*/ fprintf(stderr, "ntpshmmon: unknown status %d on segment %s\n", - status, shm_name(i)); + status, ntp_name(i)); /*@+mustfreefresh@*/ break; } |