Skip to content

Commit

Permalink
tools: bpftool: add bpftool prog help as real command i.r.t exit code
Browse files Browse the repository at this point in the history
Make error messages and return codes more consistent. Specifically, make
`bpftool prog help` a real command, instead of printing usage by default
for a non-recognized "help" command. Output is the same, but this makes
bpftool return with a success value instead of an error.

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 1d84487 commit 9f60617
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/bpf/bpftool/prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ static int do_help(int argc, char **argv)

static const struct cmd cmds[] = {
{ "show", do_show },
{ "help", do_help },
{ "dump", do_dump },
{ "pin", do_pin },
{ 0 }
Expand Down

0 comments on commit 9f60617

Please sign in to comment.