projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97306be
)
tools/bpftool: Emit name <anon> for anonymous BTFs
author
Andrii Nakryiko
<andrii@kernel.org>
Wed, 2 Dec 2020 06:52:41 +0000
(22:52 -0800)
committer
Alexei Starovoitov
<ast@kernel.org>
Thu, 3 Dec 2020 18:17:26 +0000
(10:17 -0800)
For consistency of output, emit "name <anon>" for BTFs without the name. This
keeps output more consistent and obvious.
Suggested-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link:
https://lore.kernel.org/bpf/20201202065244.530571-2-andrii@kernel.org
tools/bpf/bpftool/btf.c
patch
|
blob
|
history
diff --git
a/tools/bpf/bpftool/btf.c
b/tools/bpf/bpftool/btf.c
index ed5e971572414ce7828e927c852a92adb4d60651..bd46af6a61cccf49afd7f9fa46bbe7334f519d71 100644
(file)
--- a/
tools/bpf/bpftool/btf.c
+++ b/
tools/bpf/bpftool/btf.c
@@
-750,6
+750,8
@@
show_btf_plain(struct bpf_btf_info *info, int fd,
printf("name [%s] ", name);
else if (name && name[0])
printf("name %s ", name);
+ else
+ printf("name <anon> ");
printf("size %uB", info->btf_size);
n = 0;