linux/tools/bpf/bpftool
Jiri Olsa f76d8507d2 bpftool: Fix pretty print dump for maps without BTF loaded
The commit e5043894b2 ("bpftool: Use libbpf_get_error() to check error")
fails to dump map without BTF loaded in pretty mode (-p option).

Fixing this by making sure get_map_kv_btf won't fail in case there's
no BTF available for the map.

Fixes: e5043894b2 ("bpftool: Use libbpf_get_error() to check error")
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220216092102.125448-1-jolsa@kernel.org
2022-02-16 15:08:55 -08:00
..
bash-completion bpftool: Add gen min_core_btf command 2022-02-16 10:05:45 -08:00
Documentation bpftool: Gen min_core_btf explanation and examples 2022-02-16 10:13:21 -08:00
skeleton tools/bpf/bpftool/skeleton: replace bpf_probe_read_kernel with bpf_probe_read_kernel_str to get task comm 2022-01-20 08:52:53 +02:00
.gitignore bpftool: Fix SPDX tag for Makefiles and .gitignore 2021-11-10 09:00:52 -08:00
btf_dumper.c bpftool: Use bpf_obj_get_info_by_fd directly 2021-11-03 11:25:32 -07:00
btf.c bpftool: Fix error check when calling hashmap__new() 2022-01-12 17:01:36 -08:00
cfg.c tools, bpftool: Poison and replace kernel integer typedefs 2020-05-11 21:20:46 +02:00
cfg.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00
cgroup.c bpftool: Adding support for BTF program names 2022-01-19 10:04:41 -08:00
common.c bpftool: Fix uninit variable compilation warning 2022-02-03 16:32:25 +01:00
feature.c bpftool: Stop supporting BPF offload-enabled feature probing 2022-02-03 16:32:25 +01:00
gen.c bpftool: Implement btfgen_get_btf() 2022-02-16 10:10:42 -08:00
iter.c bpftool: Use libbpf_get_error() to check error 2021-11-14 18:38:13 -08:00
jit_disasm.c bpftool: Properly close va_list 'ap' by va_end() on error 2021-07-06 09:19:23 +02:00
json_writer.c bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
json_writer.h bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
link.c bpftool: Fix error check when calling hashmap__new() 2022-01-12 17:01:36 -08:00
main.c bpftool: Update versioning scheme, align on libbpf's version number 2022-02-10 21:09:47 -08:00
main.h bpftool: Adding support for BTF program names 2022-01-19 10:04:41 -08:00
Makefile bpftool: Implement "gen min_core_btf" logic 2022-02-16 10:05:45 -08:00
map_perf_ring.c bpftool: Update btf_dump__new() and perf_buffer__new_raw() calls 2021-11-11 16:54:06 -08:00
map.c bpftool: Fix pretty print dump for maps without BTF loaded 2022-02-16 15:08:55 -08:00
net.c bpftool: use new API for attaching XDP program 2022-01-20 21:22:02 -08:00
netlink_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.h tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
perf.c tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
pids.c bpftool: Fix error check when calling hashmap__new() 2022-01-12 17:01:36 -08:00
prog.c bpftool: Migrate from bpf_prog_test_run_xattr 2022-02-02 22:31:18 -08:00
struct_ops.c bpftool: Stop using bpf_map__def() API 2022-01-12 17:01:38 -08:00
tracelog.c tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs 2018-12-18 14:47:17 +01:00
xlated_dumper.c bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command. 2021-05-19 00:41:31 +02:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00