@@ -14,6 +14,7 @@
#include <subcmd/run-command.h>
#include <subcmd/help.h>
#include "util/debug.h"
+#include "util/util.h"
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/zalloc.h>
@@ -2,9 +2,6 @@
#ifndef BUILTIN_H
#define BUILTIN_H
-extern const char perf_usage_string[];
-extern const char perf_more_info_string[];
-
void list_common_cmds_help(void);
const char *help_unknown_cmd(const char *cmd);
@@ -39,12 +39,6 @@
#include <linux/string.h>
#include <linux/zalloc.h>
-const char perf_usage_string[] =
- "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]";
-
-const char perf_more_info_string[] =
- "See 'perf help COMMAND' for more information on a specific command.";
-
static int use_pager = -1;
const char *input_name;
@@ -12,6 +12,12 @@
#include <stdlib.h>
#include <linux/compiler.h>
+const char perf_usage_string[] =
+ "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]";
+
+const char perf_more_info_string[] =
+ "See 'perf help COMMAND' for more information on a specific command.";
+
static __noreturn void usage_builtin(const char *err)
{
fprintf(stderr, "\n Usage: %s\n", err);
@@ -15,6 +15,9 @@
#include <internal/cpumap.h>
#endif
+extern const char perf_usage_string[];
+extern const char perf_more_info_string[];
+
/* General helper functions */
void usage(const char *err) __noreturn;
void die(const char *err, ...) __noreturn __printf(1, 2);
The usage function is part of util.h, move the usage strings there too. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/builtin-help.c | 1 + tools/perf/builtin.h | 3 --- tools/perf/perf.c | 6 ------ tools/perf/util/usage.c | 6 ++++++ tools/perf/util/util.h | 3 +++ 5 files changed, 10 insertions(+), 9 deletions(-)