diff options
| author | Prashant Bhole <[email protected]> | 2017-11-08 04:55:49 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-11-11 03:35:41 +0000 |
| commit | c541b73466549c4aa4ee20ccd04ba52e4c95d6eb (patch) | |
| tree | 4e59243e803a4b26d918c1b79e08107cdd89f2ac /tools/bpf/bpftool/prog.c | |
| parent | tools: bpftool: show filenames of pinned objects (diff) | |
| download | kernel-c541b73466549c4aa4ee20ccd04ba52e4c95d6eb.tar.gz kernel-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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
| -rw-r--r-- | tools/bpf/bpftool/prog.c | 3 |
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) int err; int fd; - build_pinned_obj_table(&prog_table, BPF_OBJ_PROG); + if (show_pinned) + build_pinned_obj_table(&prog_table, BPF_OBJ_PROG); if (argc == 2) { fd = prog_parse_fd(&argc, &argv); |
