tools: bpftool: optionally show filenames of pinned objects

Making it optional to show file names of pinned objects because
it scans complete bpf-fs filesystem which is costly.
Added option -f|--bpffs. Documentation updated.

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Prashant Bhole
2017-11-08 13:55:49 +09:00
committed by David S. Miller
parent 4990f1f461
commit c541b73466
6 changed files with 25 additions and 8 deletions

View File

@@ -497,7 +497,8 @@ static int do_show(int argc, char **argv)
int err;
int fd;
build_pinned_obj_table(&map_table, BPF_OBJ_MAP);
if (show_pinned)
build_pinned_obj_table(&map_table, BPF_OBJ_MAP);
if (argc == 2) {
fd = map_parse_fd_and_info(&argc, &argv, &info, &len);