diff options
| author | Quentin Monnet <[email protected]> | 2017-10-19 22:46:22 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-10-22 01:11:32 +0000 |
| commit | 9f606179c84930ada1e347b6d84bb913c8492fec (patch) | |
| tree | 1829fb95bcdb3d59bce97a666789520e756c75df /tools/bpf/bpftool/prog.c | |
| parent | tools: bpftool: use err() instead of info() if there are too many insns (diff) | |
| download | kernel-9f606179c84930ada1e347b6d84bb913c8492fec.tar.gz kernel-9f606179c84930ada1e347b6d84bb913c8492fec.zip | |
tools: bpftool: add `bpftool prog help` as real command i.r.t exit code
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 <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Acked-by: Daniel Borkmann <[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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 6c03d2ea3f79..355c14325622 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -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 } |
