2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 16:53:54 +08:00

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>
This commit is contained in:
Prashant Bhole 2019-01-24 11:51:57 +09:00 committed by Daniel Borkmann
parent 923cefe3f9
commit 866e6ac474

View File

@ -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 }
};