Skip to content

Commit

Permalink
tools: bpftool: use err() instead of info() if there are too many insns
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Quentin Monnet authored and David S. Miller committed Oct 22, 2017
1 parent 1739c26 commit 1d84487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bpf/bpftool/prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ static int do_dump(int argc, char **argv)
}

if (*member_len > buf_size) {
info("too many instructions returned\n");
err("too many instructions returned\n");
goto err_free;
}

Expand Down

0 comments on commit 1d84487

Please sign in to comment.