summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2019-01-24 05:51:57 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-01-24 12:47:52 +0300
commit866e6ac47409f0bd12398b777fef61fb51ce3680 (patch)
tree5a109ec685094de8cd0b6ff021d1e65a4af48026 /tools/bpf
parent923cefe3f90148b5da26433f6affbce7908e528d (diff)
downloadlinux-866e6ac47409f0bd12398b777fef61fb51ce3680.tar.xz
bpftool: feature probing, change default action
When 'bpftool feature' is executed it shows incorrect help string. test# bpftool feature Usage: bpftool bpftool probe [COMPONENT] [macros [prefix PREFIX]] bpftool bpftool help COMPONENT := { kernel | dev NAME } Instead of fixing the help text by tweaking argv[] indices, this patch changes the default action to 'probe'. It makes the behavior consistent with other subcommands, where first subcommand without extra parameter results in 'show' action. Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/feature.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 993c6f1e5473..d672d9086fff 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -753,8 +753,8 @@ static int do_help(int argc, char **argv)
}
static const struct cmd cmds[] = {
- { "help", do_help },
{ "probe", do_probe },
+ { "help", do_help },
{ 0 }
};