Skip to content
Commit 45f504f3 authored by Jiri Olsa's avatar Jiri Olsa Committed by Bruce Ashfield
Browse files

bpftool: Fix pretty print dump for maps without BTF loaded

[ Upstream commit f76d8507 ]

The commit e5043894 ("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: e5043894

 ("bpftool: Use libbpf_get_error() to check error")
Suggested-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220216092102.125448-1-jolsa@kernel.org
Signed-off-by: default avatarWentao Zhang <wentao.zhang@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
parent 9bc0938c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment