Netdev List
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin.monnet@netronome.com>
To: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: netdev@vger.kernel.org, Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: Re: [PATCH bpf-next] bpftool: feature probing, change default action
Date: Thu, 24 Jan 2019 09:05:58 +0000	[thread overview]
Message-ID: <fc46792c-c951-2f14-d2a7-dd0f400eaa60@netronome.com> (raw)
In-Reply-To: <20190124025157.6812-1-bhole_prashant_q7@lab.ntt.co.jp>

2019-01-24 11:51 UTC+0900 ~ Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
> 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>
> ---
>   tools/bpf/bpftool/feature.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 }
>   };
>   
> 

Oh, thanks! This seems to be the correct thing to do indeed.

Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>

  reply	other threads:[~2019-01-24  9:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24  2:51 [PATCH bpf-next] bpftool: feature probing, change default action Prashant Bhole
2019-01-24  9:05 ` Quentin Monnet [this message]
2019-01-24 11:29 ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc46792c-c951-2f14-d2a7-dd0f400eaa60@netronome.com \
    --to=quentin.monnet@netronome.com \
    --cc=ast@kernel.org \
    --cc=bhole_prashant_q7@lab.ntt.co.jp \
    --cc=daniel@iogearbox.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox