diff options
author | Tobias Klauser <[email protected]> | 2020-05-25 15:54:21 +0200 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2020-06-01 14:38:19 -0700 |
commit | dc3ca5cf3e0be9fb73f4691247367d76a22bf30b (patch) | |
tree | d7393cd6ba68b08787e37d9414c32a9ce10fbdf4 /kernel/bpf/syscall.c | |
parent | 73a4f0407e67cdfdf55dd94f573ed4ee2d0d62fe (diff) |
tools, bpftool: Print correct error message when failing to load BTF
btf__parse_raw and btf__parse_elf return negative error numbers wrapped
in an ERR_PTR, so the extracted value needs to be negated before passing
them to strerror which expects a positive error number.
Before:
Error: failed to load BTF from .../vmlinux: Unknown error -2
After:
Error: failed to load BTF from .../vmlinux: No such file or directory
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'kernel/bpf/syscall.c')
0 files changed, 0 insertions, 0 deletions