]> git.ipfire.org Git - thirdparty/nqptp.git/commitdiff
add Shared Memory Interface version to the -V output.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 25 Apr 2021 18:02:21 +0000 (19:02 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 25 Apr 2021 18:02:21 +0000 (19:02 +0100)
nqptp-shm-structures.h
nqptp.c

index 42d4e23564356d03f62174b975d404628777cdc3..f30f9896ac2bb9e98fc19001d88af6f3cbc36821 100644 (file)
@@ -37,7 +37,7 @@
 
 struct shm_structure {
   pthread_mutex_t shm_mutex; // for safely accessing the structure
-  uint16_t version;          // deprecated -- check this is equal to NQPTP_SHM_STRUCTURES_VERSION
+  uint16_t version;          // check this is equal to NQPTP_SHM_STRUCTURES_VERSION
   uint32_t flags;            // unused
   uint64_t master_clock_id;  // the current master clock
   uint64_t local_time;       // the time when the offset was calculated
diff --git a/nqptp.c b/nqptp.c
index 504750e862a791a06dbcb217c05999c53a6c6a31..04c5fb6650fe3cb965e41019afccbc878c0d592d 100644 (file)
--- a/nqptp.c
+++ b/nqptp.c
@@ -122,7 +122,7 @@ int main(int argc, char **argv) {
   for (i = 1; i < argc; ++i) {
     if (argv[i][0] == '-') {
       if (strcmp(argv[i] + 1, "V") == 0) {
-        fprintf(stdout, "%s\n", PACKAGE_STRING);
+        fprintf(stdout, "Version: %s. Shared Memory Interface Version: %u.\n", VERSION, NQPTP_SHM_STRUCTURES_VERSION);
         exit(EXIT_SUCCESS);
       } else if (strcmp(argv[i] + 1, "vvv") == 0) {
         debug_level = 3;