summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/bpf-loader.c4
-rw-r--r--tools/perf/util/bpf-loader.h15
2 files changed, 11 insertions, 8 deletions
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 95a27bb6f1a1..80dead642719 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -1791,8 +1791,8 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size)
1791 return 0; 1791 return 0;
1792} 1792}
1793 1793
1794int bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused, 1794int bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
1795 int err, char *buf, size_t size) 1795 int err, char *buf, size_t size)
1796{ 1796{
1797 bpf__strerror_head(err, buf, size); 1797 bpf__strerror_head(err, buf, size);
1798 bpf__strerror_end(buf, size); 1798 bpf__strerror_end(buf, size);
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index 6be0eec043c6..8eca75145ac2 100644
--- a/tools/perf/util/bpf-loader.h
+++ b/tools/perf/util/bpf-loader.h
@@ -83,9 +83,7 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size);
83 83
84int bpf__setup_stdout(struct perf_evlist *evlist); 84int bpf__setup_stdout(struct perf_evlist *evlist);
85int bpf__setup_output_event(struct perf_evlist *evlist, const char *name); 85int bpf__setup_output_event(struct perf_evlist *evlist, const char *name);
86int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, 86int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size);
87 char *buf, size_t size);
88
89#else 87#else
90#include <errno.h> 88#include <errno.h>
91 89
@@ -200,11 +198,16 @@ bpf__strerror_apply_obj_config(int err __maybe_unused,
200} 198}
201 199
202static inline int 200static inline int
203bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused, 201bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
204 int err __maybe_unused, char *buf, 202 int err __maybe_unused, char *buf, size_t size)
205 size_t size)
206{ 203{
207 return __bpf_strerror(buf, size); 204 return __bpf_strerror(buf, size);
208} 205}
206
209#endif 207#endif
208
209static inline int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, char *buf, size_t size)
210{
211 return bpf__strerror_setup_output_event(evlist, err, buf, size);
212}
210#endif 213#endif