diff options
author | Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> | 2017-11-08 13:55:49 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-11 12:35:41 +0900 |
commit | c541b73466549c4aa4ee20ccd04ba52e4c95d6eb (patch) | |
tree | 4e59243e803a4b26d918c1b79e08107cdd89f2ac /tools/bpf/bpftool/map.c | |
parent | 4990f1f4610b483a60397ed2768d268df228a551 (diff) | |
download | blackbird-obmc-linux-c541b73466549c4aa4ee20ccd04ba52e4c95d6eb.tar.gz blackbird-obmc-linux-c541b73466549c4aa4ee20ccd04ba52e4c95d6eb.zip |
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>
Diffstat (limited to 'tools/bpf/bpftool/map.c')
-rw-r--r-- | tools/bpf/bpftool/map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index de0980657cef..e2450c8e88e6 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@ -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); |