Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c3ddee1 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Daniel Borkmann
Browse files

bpftool: fix BTF raw dump of FWD's fwd_kind



kflag bit determines whether FWD is for struct or union. Use that bit.

Fixes: c93cc690 ("bpftool: add ability to dump BTF types")
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 7ed4b4e6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ 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"
		const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union"
							       : "struct";

		if (json_output)