diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-06-27 10:22:31 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-06-27 10:22:31 -0400 |
commit | 62d94b00f80b0ecb7fa9eea0539c59e9f82b0fcd (patch) | |
tree | c950f6bc7b253c0e6005cf282fc0370a85c6171a /tools/perf/util/usage.c | |
parent | b211d79ac1ad43d6d8d82e7f1a5c26055a249135 (diff) |
perf tools: Replace error() with pr_err()
To consolidate the error reporting facility.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-b41iot1094katoffdf19w9zk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/usage.c')
-rw-r--r-- | tools/perf/util/usage.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/perf/util/usage.c b/tools/perf/util/usage.c index 37225dc72738..bf185f28b19e 100644 --- a/tools/perf/util/usage.c +++ b/tools/perf/util/usage.c | |||
@@ -28,15 +28,9 @@ static __noreturn void die_builtin(const char *err, va_list params) | |||
28 | exit(128); | 28 | exit(128); |
29 | } | 29 | } |
30 | 30 | ||
31 | static void error_builtin(const char *err, va_list params) | ||
32 | { | ||
33 | report(" Error: ", err, params); | ||
34 | } | ||
35 | |||
36 | /* If we are in a dlopen()ed .so write to a global variable would segfault | 31 | /* If we are in a dlopen()ed .so write to a global variable would segfault |
37 | * (ugh), so keep things static. */ | 32 | * (ugh), so keep things static. */ |
38 | static void (*usage_routine)(const char *err) __noreturn = usage_builtin; | 33 | static void (*usage_routine)(const char *err) __noreturn = usage_builtin; |
39 | static void (*error_routine)(const char *err, va_list params) = error_builtin; | ||
40 | 34 | ||
41 | void usage(const char *err) | 35 | void usage(const char *err) |
42 | { | 36 | { |
@@ -51,13 +45,3 @@ void die(const char *err, ...) | |||
51 | die_builtin(err, params); | 45 | die_builtin(err, params); |
52 | va_end(params); | 46 | va_end(params); |
53 | } | 47 | } |
54 | |||
55 | int error(const char *err, ...) | ||
56 | { | ||
57 | va_list params; | ||
58 | |||
59 | va_start(params, err); | ||
60 | error_routine(err, params); | ||
61 | va_end(params); | ||
62 | return -1; | ||
63 | } | ||