diff options
| author | Mykyta Yatsenko <[email protected]> | 2024-11-11 21:29:18 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-11-12 04:29:45 +0000 |
| commit | af8380d51948e7e5566b5a659c78eb25e1b09f6c (patch) | |
| tree | 714029f7924b8e610505c1006d229d8e2ab077d7 /tools/lib/bpf/btf_dump.c | |
| parent | libbpf: Stringify errno in log messages in libbpf.c (diff) | |
| download | kernel-af8380d51948e7e5566b5a659c78eb25e1b09f6c.tar.gz kernel-af8380d51948e7e5566b5a659c78eb25e1b09f6c.zip | |
libbpf: Stringify errno in log messages in btf*.c
Convert numeric error codes into the string representations in log
messages in btf.c and btf_dump.c.
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/btf_dump.c')
| -rw-r--r-- | tools/lib/bpf/btf_dump.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c index 468392f9882d..a3fc6908f6c9 100644 --- a/tools/lib/bpf/btf_dump.c +++ b/tools/lib/bpf/btf_dump.c @@ -21,6 +21,7 @@ #include "hashmap.h" #include "libbpf.h" #include "libbpf_internal.h" +#include "str_error.h" static const char PREFIXES[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t"; static const size_t PREFIX_CNT = sizeof(PREFIXES) - 1; @@ -1304,7 +1305,7 @@ static void btf_dump_emit_type_decl(struct btf_dump *d, __u32 id, * chain, restore stack, emit warning, and try to * proceed nevertheless */ - pr_warn("not enough memory for decl stack: %d\n", err); + pr_warn("not enough memory for decl stack: %s\n", errstr(err)); d->decl_stack_cnt = stack_start; return; } |
