aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/gen_loader.c
diff options
context:
space:
mode:
authorMykyta Yatsenko <[email protected]>2024-11-11 21:29:19 +0000
committerAndrii Nakryiko <[email protected]>2024-11-12 04:29:45 +0000
commit4ce16ddd71054b1e47a65f8af5e3af6b64908e46 (patch)
treeb4b70b0c4561728a2b9d8bfcdcaed6d096873ca2 /tools/lib/bpf/gen_loader.c
parentlibbpf: Stringify errno in log messages in btf*.c (diff)
downloadkernel-4ce16ddd71054b1e47a65f8af5e3af6b64908e46.tar.gz
kernel-4ce16ddd71054b1e47a65f8af5e3af6b64908e46.zip
libbpf: Stringify errno in log messages in the remaining code
Convert numeric error codes into the string representations in log messages in the rest of libbpf source files. Signed-off-by: Mykyta Yatsenko <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/gen_loader.c')
-rw-r--r--tools/lib/bpf/gen_loader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lib/bpf/gen_loader.c b/tools/lib/bpf/gen_loader.c
index 8a2b0f62d91d..113ae4abd345 100644
--- a/tools/lib/bpf/gen_loader.c
+++ b/tools/lib/bpf/gen_loader.c
@@ -14,6 +14,7 @@
#include "bpf_gen_internal.h"
#include "skel_internal.h"
#include <asm/byteorder.h>
+#include "str_error.h"
#define MAX_USED_MAPS 64
#define MAX_USED_PROGS 32
@@ -393,7 +394,7 @@ int bpf_gen__finish(struct bpf_gen *gen, int nr_progs, int nr_maps)
blob_fd_array_off(gen, i));
emit(gen, BPF_MOV64_IMM(BPF_REG_0, 0));
emit(gen, BPF_EXIT_INSN());
- pr_debug("gen: finish %d\n", gen->error);
+ pr_debug("gen: finish %s\n", errstr(gen->error));
if (!gen->error) {
struct gen_loader_opts *opts = gen->opts;