[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33@git.kernel.org>
Date: Thu, 10 Dec 2015 00:19:04 -0800
From: tip-bot for Josh Poimboeuf <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, jpoimboe@...hat.com, jolsa@...hat.com,
namhyung@...nel.org, acme@...hat.com, hpa@...or.com,
linux-kernel@...r.kernel.org, peterz@...radead.org,
tglx@...utronix.de
Subject: [tip:perf/core] perf tools: Move cmd_version()
to builtin-version.c
Commit-ID: 0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33
Gitweb: http://git.kernel.org/tip/0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33
Author: Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Mon, 7 Dec 2015 22:21:48 -0600
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 9 Dec 2015 13:42:03 -0300
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@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/e908b1b68f20ab6d8d33941d5571c23110622e60.1449548395.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/Build | 1 +
tools/perf/builtin-version.c | 10 ++++++++++
tools/perf/util/help.c | 7 -------
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/tools/perf/Build b/tools/perf/Build
index 2c7aaf2..2a41217 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -20,6 +20,7 @@ perf-y += builtin-kvm.o
perf-y += builtin-inject.o
perf-y += builtin-mem.o
perf-y += builtin-data.o
+perf-y += builtin-version.o
perf-$(CONFIG_AUDIT) += builtin-trace.o
perf-$(CONFIG_LIBELF) += builtin-probe.o
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;
+}
diff --git a/tools/perf/util/help.c b/tools/perf/util/help.c
index fa1fc4a..929c93f 100644
--- a/tools/perf/util/help.c
+++ b/tools/perf/util/help.c
@@ -332,10 +332,3 @@ const char *help_unknown_cmd(const char *cmd)
exit(1);
}
-
-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;
-}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists