summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2020-08-01 10:26:41 -0700
committerStephen Hemminger <stephen@networkplumber.org>2020-08-03 10:02:47 -0700
commitfbef655568ee931a82ad463a6f46f01ce3fb27aa (patch)
tree6425f1ebc5d0ac403f7efcc38e3d87d7de6fb8d5 /misc
parentcb17e0cc578162a33d62afcbf9df471183a6b0c7 (diff)
downloadiproute2-fbef655568ee931a82ad463a6f46f01ce3fb27aa.tar.gz
replace SNAPSHOT with auto-generated version string
Replace the iproute2 snapshot with a version string which is autogenerated as part of the build process using git describe. This will also allow seeing if the version of the command is built from the same sources is as upstream. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/ifstat.c4
-rw-r--r--misc/nstat.c4
-rw-r--r--misc/rtacct.c4
-rw-r--r--misc/ss.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/misc/ifstat.c b/misc/ifstat.c
index 03327af8..c05183d7 100644
--- a/misc/ifstat.c
+++ b/misc/ifstat.c
@@ -33,7 +33,7 @@
#include "libnetlink.h"
#include "json_writer.h"
-#include "SNAPSHOT.h"
+#include "version.h"
#include "utils.h"
int dump_zeros;
@@ -869,7 +869,7 @@ int main(int argc, char *argv[])
break;
case 'v':
case 'V':
- printf("ifstat utility, iproute2-ss%s\n", SNAPSHOT);
+ printf("ifstat utility, iproute2-%s\n", version);
exit(0);
case 'h':
case '?':
diff --git a/misc/nstat.c b/misc/nstat.c
index 88f52eaf..6fdd316c 100644
--- a/misc/nstat.c
+++ b/misc/nstat.c
@@ -29,7 +29,7 @@
#include <getopt.h>
#include <json_writer.h>
-#include <SNAPSHOT.h>
+#include "version.h"
#include "utils.h"
int dump_zeros;
@@ -621,7 +621,7 @@ int main(int argc, char *argv[])
break;
case 'v':
case 'V':
- printf("nstat utility, iproute2-ss%s\n", SNAPSHOT);
+ printf("nstat utility, iproute2-%s\n", version);
exit(0);
case 'h':
case '?':
diff --git a/misc/rtacct.c b/misc/rtacct.c
index c4bb5bc3..47b27e3f 100644
--- a/misc/rtacct.c
+++ b/misc/rtacct.c
@@ -30,7 +30,7 @@
#include "rt_names.h"
-#include <SNAPSHOT.h>
+#include "version.h"
int reset_history;
int ignore_history;
@@ -463,7 +463,7 @@ int main(int argc, char *argv[])
break;
case 'v':
case 'V':
- printf("rtacct utility, iproute2-ss%s\n", SNAPSHOT);
+ printf("rtacct utility, iproute2-%s\n", version);
exit(0);
case 'M':
/* Some secret undocumented option, nobody
diff --git a/misc/ss.c b/misc/ss.c
index 5aa10e4a..35066bf6 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -35,7 +35,7 @@
#include "ll_map.h"
#include "libnetlink.h"
#include "namespace.h"
-#include "SNAPSHOT.h"
+#include "version.h"
#include "rt_names.h"
#include "cg_map.h"
@@ -5411,7 +5411,7 @@ int main(int argc, char *argv[])
break;
case 'v':
case 'V':
- printf("ss utility, iproute2-ss%s\n", SNAPSHOT);
+ printf("ss utility, iproute2-%s\n", version);
exit(0);
case 'z':
show_sock_ctx++;