Message ID | 20220308131056.6732-2-laoar.shao@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | bpf, mm: recharge bpf memory from offline memcg | expand |
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index e746642..0bba337 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@ -620,17 +620,14 @@ static int show_map_close_plain(int fd, struct bpf_map_info *info) u32_as_hash_field(info->id)) printf("\n\tpinned %s", (char *)entry->value); } - printf("\n"); if (frozen_str) { frozen = atoi(frozen_str); free(frozen_str); } - if (!info->btf_id && !frozen) - return 0; - - printf("\t"); + if (info->btf_id || frozen) + printf("\n\t"); if (info->btf_id) printf("btf_id %d", info->btf_id);
If there is no btf_id or frozen, it will not show the pids, but the pids doesn't depends on any one of them. Fixes: 9330986c0300 ("bpf: Add bloom filter map implementation") Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Cc: Joanne Koong <joannekoong@fb.com> --- tools/bpf/bpftool/map.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)