summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-version.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2015-12-07 22:21:48 -0600
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-12-09 13:42:03 -0300
commit0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33 (patch)
tree42b723883ba38f98c98b8a11a24948407a51bc78 /tools/perf/builtin-version.c
parent2bdb2c2729d2ba2f2f90b729d04254308096c5a0 (diff)
downloadop-kernel-dev-0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33.zip
op-kernel-dev-0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33.tar.gz
perf tools: Move cmd_version() to builtin-version.c
Move cmd_version() to its own file so that help.c can be moved to a library. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/e908b1b68f20ab6d8d33941d5571c23110622e60.1449548395.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-version.c')
-rw-r--r--tools/perf/builtin-version.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c
new file mode 100644
index 0000000..9b10cda
--- /dev/null
+++ b/tools/perf/builtin-version.c
@@ -0,0 +1,10 @@
+#include "util/util.h"
+#include "builtin.h"
+#include "perf.h"
+
+int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused,
+ const char *prefix __maybe_unused)
+{
+ printf("perf version %s\n", perf_version_string);
+ return 0;
+}
OpenPOWER on IntegriCloud