aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2017-11-07 23:55:49 -0500
committerDavid S. Miller <davem@davemloft.net>2017-11-10 22:35:41 -0500
commitc541b73466549c4aa4ee20ccd04ba52e4c95d6eb (patch)
tree4e59243e803a4b26d918c1b79e08107cdd89f2ac /tools/bpf/bpftool/prog.c
parent4990f1f4610b483a60397ed2768d268df228a551 (diff)
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/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 8f94b8ac2e63..f45c44ef9bec 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -382,7 +382,8 @@ static int do_show(int argc, char **argv)
382 int err; 382 int err;
383 int fd; 383 int fd;
384 384
385 build_pinned_obj_table(&prog_table, BPF_OBJ_PROG); 385 if (show_pinned)
386 build_pinned_obj_table(&prog_table, BPF_OBJ_PROG);
386 387
387 if (argc == 2) { 388 if (argc == 2) {
388 fd = prog_parse_fd(&argc, &argv); 389 fd = prog_parse_fd(&argc, &argv);