aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/btf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-05-17 16:33:06 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-17 16:33:06 -0700
commit5a35c8ea7c403871d5c533f8872f5b61f7c0d293 (patch)
treeb692c78a4b6ef54cc66768840b32c260346d81d6 /tools/bpf/bpftool/btf.c
parentMerge tag 'mlx5-fixes-2019-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux (diff)
parentbpftool: fix BTF raw dump of FWD's fwd_kind (diff)
downloadlinux-dev-5a35c8ea7c403871d5c533f8872f5b61f7c0d293.tar.xz
linux-dev-5a35c8ea7c403871d5c533f8872f5b61f7c0d293.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2019-05-18 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix bpftool's raw BTF dump in relation to forward declarations of union/ structs, and another fix to unexport logging helpers, from Andrii. 2) Fix inode permission check for retrieving bpf programs, from Chenbo. 3) Fix bpftool to raise rlimit earlier as otherwise libbpf's feature probing can fail and subsequently it refuses to load an object, from Yonghong. 4) Fix declaration of bpf_get_current_task() in kselftests, from Alexei. 5) Fix up BPF kselftest .gitignore to add generated files, from Stanislav. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/bpf/bpftool/btf.c')
-rw-r--r--tools/bpf/bpftool/btf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index 58a2cd002a4b..7317438ecd9e 100644
--- a/tools/bpf/bpftool/btf.c
+++ b/tools/bpf/bpftool/btf.c
@@ -208,8 +208,8 @@ static int dump_btf_type(const struct btf *btf, __u32 id,
break;
}
case BTF_KIND_FWD: {
- const char *fwd_kind = BTF_INFO_KIND(t->info) ? "union"
- : "struct";
+ const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union"
+ : "struct";
if (json_output)
jsonw_string_field(w, "fwd_kind", fwd_kind);