[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzaCGu8CYc-bztAH4Aqb812jbpr2JRD0T_Wa-9UbS_sAGg@mail.gmail.com>
Date: Thu, 8 Aug 2019 11:54:12 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
oss-drivers@...ronome.com, Andy Lutomirski <luto@...nel.org>,
Quentin Monnet <quentin.monnet@...ronome.com>
Subject: Re: [PATCH bpf 2/2] tools: bpftool: add error message on pin failure
On Tue, Aug 6, 2019 at 5:21 PM Jakub Kicinski
<jakub.kicinski@...ronome.com> wrote:
>
> No error message is currently printed if the pin syscall
> itself fails. It got lost in the loadall refactoring.
>
> Fixes: 77380998d91d ("bpftool: add loadall command")
> Reported-by: Andy Lutomirski <luto@...nel.org>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@...ronome.com>
> ---
Acked-by: Andrii Nakryiko <andriin@...com>
> CC: luto@...nel.org, sdf@...gle.com
>
> tools/bpf/bpftool/common.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
> index c52a6ffb8949..6a71324be628 100644
> --- a/tools/bpf/bpftool/common.c
> +++ b/tools/bpf/bpftool/common.c
> @@ -204,7 +204,11 @@ int do_pin_fd(int fd, const char *name)
> if (err)
> return err;
>
> - return bpf_obj_pin(fd, name);
> + err = bpf_obj_pin(fd, name);
> + if (err)
> + p_err("can't pin the object (%s): %s", name, strerror(errno));
> +
> + return err;
> }
>
> int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(__u32))
> --
> 2.21.0
>
Powered by blists - more mailing lists