aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2017-10-19 18:46:21 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-21 21:11:32 -0400
commit1d84487e2a2b98892c3dec7934604e9b76577aa6 (patch)
treedbc3328632eeabdae97f536ee958f20b6baa2f0c /tools/bpf/bpftool/prog.c
parent1739c26da72c4170c86c368c75133adbb740efef (diff)
tools: bpftool: use err() instead of info() if there are too many insns
Make error messages and return codes more consistent. Specifically, replace the use of info() macro with err() when too many eBPF instructions are received to be dumped, given that bpftool returns with a non-null exit value in that case. Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index ede7957adcd9..6c03d2ea3f79 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -416,7 +416,7 @@ static int do_dump(int argc, char **argv)
416 } 416 }
417 417
418 if (*member_len > buf_size) { 418 if (*member_len > buf_size) {
419 info("too many instructions returned\n"); 419 err("too many instructions returned\n");
420 goto err_free; 420 goto err_free;
421 } 421 }
422 422