linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@distanz.ch>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Cc: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
	songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
	john.fastabend@gmail.com, kpsingh@chromium.org,
	quentin@isovalent.com, kuba@kernel.org, toke@redhat.com,
	jolsa@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com
Subject: Re: [PATCH] tools/bpf/bpftool: Fix wrong return value in do_dump()
Date: Mon, 3 Aug 2020 10:41:28 +0200	[thread overview]
Message-ID: <20200803084128.4ogaewayotcubff5@distanz.ch> (raw)
In-Reply-To: <20200802111540.5384-1-tianjia.zhang@linux.alibaba.com>

On 2020-08-02 at 13:15:40 +0200, Tianjia Zhang <tianjia.zhang@linux.alibaba.com> wrote:
> In case of btf_id does not exist, a negative error code -ENOENT
> should be returned.
> 
> Fixes: c93cc69004df3 ("bpftool: add ability to dump BTF types")
> Cc: Andrii Nakryiko <andriin@fb.com>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

Reviewed-by: Tobias Klauser <tklauser@distanz.ch>

> ---
>  tools/bpf/bpftool/btf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> index faac8189b285..c2f1fd414820 100644
> --- a/tools/bpf/bpftool/btf.c
> +++ b/tools/bpf/bpftool/btf.c
> @@ -596,7 +596,7 @@ static int do_dump(int argc, char **argv)
>  			goto done;
>  		}
>  		if (!btf) {
> -			err = ENOENT;
> +			err = -ENOENT;
>  			p_err("can't find btf with ID (%u)", btf_id);
>  			goto done;
>  		}
> -- 
> 2.26.2
> 

  parent reply	other threads:[~2020-08-03  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 11:15 [PATCH] tools/bpf/bpftool: Fix wrong return value in do_dump() Tianjia Zhang
2020-08-03  1:16 ` Andrii Nakryiko
2020-08-03  5:04   ` John Fastabend
2020-08-03  8:41 ` Tobias Klauser [this message]
2020-08-03 14:33 ` 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=20200803084128.4ogaewayotcubff5@distanz.ch \
    --to=tklauser@distanz.ch \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --cc=songliubraving@fb.com \
    --cc=tianjia.zhang@alibaba.com \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.com \
    /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;
as well as URLs for NNTP newsgroup(s).