bpftool: fix BTF raw dump of FWD's fwd_kind
kflag bit determines whether FWD is for struct or union. Use that bit.
Fixes: c93cc69004
("bpftool: add ability to dump BTF types")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:

committed by
Daniel Borkmann

parent
7ed4b4e60b
commit
9c3ddee124
@@ -208,7 +208,7 @@ static int dump_btf_type(const struct btf *btf, __u32 id,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTF_KIND_FWD: {
|
case BTF_KIND_FWD: {
|
||||||
const char *fwd_kind = BTF_INFO_KIND(t->info) ? "union"
|
const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union"
|
||||||
: "struct";
|
: "struct";
|
||||||
|
|
||||||
if (json_output)
|
if (json_output)
|
||||||
|
Reference in New Issue
Block a user