diff mbox series

trace-cmd: Add git version string to trace-cmd --version output

Message ID 20190705121421.17af9096@gandalf.local.home (mailing list archive)
State Accepted
Commit eba17becd5f0181cb66919815b3fefdf4563bb4b
Headers show
Series trace-cmd: Add git version string to trace-cmd --version output | expand

Commit Message

Steven Rostedt July 5, 2019, 4:14 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Commit d74f3845ddebf0 ("trace-cmd: Make the version defines part of
tc-version.h") created a VERSION_GIT define to include in the trace.dat
file. It would also be helpful to have this displayed with the --version
option too.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tracecmd/trace-usage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
index 406384c4..2532d92a 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -314,8 +314,8 @@  void usage(char **argv)
 	p = basename(arg);
 
 	printf("\n"
-	       "%s version %s\n\n"
-	       "usage:\n", p, VERSION_STRING);
+	       "%s version %s (%s)\n\n"
+	       "usage:\n", p, VERSION_STRING, VERSION_GIT);
 
 	if (argv[1])
 		help = find_help(argv[1]);