projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ed4b4e
)
bpftool: fix BTF raw dump of FWD's fwd_kind
author
Andrii Nakryiko
<andriin@fb.com>
Fri, 17 May 2019 06:21:29 +0000
(23:21 -0700)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Fri, 17 May 2019 12:21:29 +0000
(14:21 +0200)
kflag bit determines whether FWD is for struct or union. Use that bit.
Fixes:
c93cc69004df
("bpftool: add ability to dump BTF types")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/btf.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/bpf/bpftool/btf.c
b/tools/bpf/bpftool/btf.c
index 58a2cd002a4b18dc0ed87d64266a2fef13107ab2..7317438ecd9ec237345ea316de19e52739347001 100644
(file)
--- 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_K
IND
(t->info) ? "union"
- : "struct";
+ const char *fwd_kind = BTF_INFO_K
FLAG
(t->info) ? "union"
+
: "struct";
if (json_output)
jsonw_string_field(w, "fwd_kind", fwd_kind);