aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2018-11-08 06:52:26 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2018-11-09 02:20:52 -0500
commita8bfd2bc29f3bf35c7b588b102662375b0184475 (patch)
treec2c9c46f25b74d63f5fa15e040ddfb2d43cb1adf /tools/bpf/bpftool/prog.c
parent53909030aa29bffe1f8490df62176c2375135652 (diff)
tools: bpftool: fix plain output and doc for --bpffs option
Edit the documentation of the -f|--bpffs option to make it explicit that it dumps paths of pinned programs when bpftool is used to list the programs only, so that users do not believe they will see the name of the newly pinned program with "bpftool prog pin" or "bpftool prog load". Also fix the plain output: do not add a blank line after each program block, in order to remain consistent with what bpftool does when the option is not passed. Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 5302ee282409..9785244acc7b 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -357,10 +357,9 @@ static void print_prog_plain(struct bpf_prog_info *info, int fd)
357 if (!hash_empty(prog_table.table)) { 357 if (!hash_empty(prog_table.table)) {
358 struct pinned_obj *obj; 358 struct pinned_obj *obj;
359 359
360 printf("\n");
361 hash_for_each_possible(prog_table.table, obj, hash, info->id) { 360 hash_for_each_possible(prog_table.table, obj, hash, info->id) {
362 if (obj->id == info->id) 361 if (obj->id == info->id)
363 printf("\tpinned %s\n", obj->path); 362 printf("\n\tpinned %s", obj->path);
364 } 363 }
365 } 364 }
366 365