Skip to content

Commit 866e6ac

Browse files
pbholeborkmann
authored andcommitted
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 <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 923cefe commit 866e6ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/bpf/bpftool/feature.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,8 @@ static int do_help(int argc, char **argv)
753753
}
754754

755755
static const struct cmd cmds[] = {
756-
{ "help", do_help },
757756
{ "probe", do_probe },
757+
{ "help", do_help },
758758
{ 0 }
759759
};
760760

0 commit comments

Comments
 (0)