diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-04-15 11:18:11 +0200 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2019-04-15 17:19:21 +0200 |
commit | 8310d0fedb5fc13610b95e100c8639c97892a2b5 (patch) | |
tree | cc94f6934d8c7e0d52e383650e35220c5cc9fc8f /VNFs/DPPD-PROX/version.h | |
parent | d4216dd28019256fd6363ed4269d540ef64ec23c (diff) |
PROX: update versionstable/hunter
PROX version was not udpated since a long time, resulting in
difficulty to easily understand which version is being run.
Improved solution should be to support sha1.
Change-Id: I9d68bd64f52f32544d31d2b8c6bcd0c55c7c228c
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/version.h')
-rw-r--r-- | VNFs/DPPD-PROX/version.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/VNFs/DPPD-PROX/version.h b/VNFs/DPPD-PROX/version.h index a1d01235..a9f46b66 100644 --- a/VNFs/DPPD-PROX/version.h +++ b/VNFs/DPPD-PROX/version.h @@ -17,18 +17,18 @@ #ifndef _VERSION_H_ #define _VERSION_H_ -#define STRINGIFY(s) #s -#define SSTR(s) STRINGIFY(s) - /* PROGRAM_NAME defined through Makefile */ -#define VERSION_MAJOR 0 -#define VERSION_MINOR 41 +#define VERSION_MAJOR 0 // Pre-production +#define VERSION_MINOR 1904 // 19.04 i.e. April 2019 #define VERSION_REV 0 +static inline char *VERSION_STR(void) +{ + static char version_buffer[32]; + snprintf(version_buffer, sizeof(version_buffer), "%02d.%02d", VERSION_MINOR / 100, VERSION_MINOR % 100); #if VERSION_REV > 0 -#define VERSION_STR "v" SSTR(VERSION_MAJOR) "." SSTR(VERSION_MINOR) "." SSTR(VERSION_REV) -#else -#define VERSION_STR "v" SSTR(VERSION_MAJOR) "." SSTR(VERSION_MINOR) + snprintf(version_buffer + strlen(version_buffer), sizeof(version_buffer) - strlen(version_buffer), ".%02d", VERSION_REV); #endif - + return version_buffer; #endif /* _VERSION_H_ */ +} |