From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 25 Apr 2021 18:02:21 +0000 (+0100) Subject: add Shared Memory Interface version to the -V output. X-Git-Tag: 1.1-dev~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d88a7e9dbf05732bd9431f7ec20014bdb589bfa5;p=thirdparty%2Fnqptp.git add Shared Memory Interface version to the -V output. --- diff --git a/nqptp-shm-structures.h b/nqptp-shm-structures.h index 42d4e23..f30f989 100644 --- a/nqptp-shm-structures.h +++ b/nqptp-shm-structures.h @@ -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 504750e..04c5fb6 100644 --- 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;