mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 06:43:09 +00:00
tools/bpftool: Emit name <anon> for anonymous BTFs
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
This commit is contained in:
parent
97306be45f
commit
71ccb50074
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user