diff mbox series

[bpf-next] tools/bpftool: remove warning about PID iterator support

Message ID 20200710232605.20918-1-andriin@fb.com
State Accepted
Delegated to: BPF Maintainers
Headers show
Series [bpf-next] tools/bpftool: remove warning about PID iterator support | expand

Commit Message

Andrii Nakryiko July 10, 2020, 11:26 p.m. UTC
Don't emit warning that bpftool was built without PID iterator support. This
error garbles JSON output of otherwise perfectly valid show commands.

Reported-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/bpf/bpftool/pids.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Yonghong Song July 11, 2020, 2:09 a.m. UTC | #1
On 7/10/20 4:26 PM, Andrii Nakryiko wrote:
> Don't emit warning that bpftool was built without PID iterator support. This
> error garbles JSON output of otherwise perfectly valid show commands.
> 
> Reported-by: Andrey Ignatov <rdna@fb.com>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Thanks for the fix.
Acked-by: Yonghong Song <yhs@fb.com>

> ---
>   tools/bpf/bpftool/pids.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tools/bpf/bpftool/pids.c b/tools/bpf/bpftool/pids.c
> index c0d23ce4a6f4..e3b116325403 100644
> --- a/tools/bpf/bpftool/pids.c
> +++ b/tools/bpf/bpftool/pids.c
> @@ -15,7 +15,6 @@
>   
>   int build_obj_refs_table(struct obj_refs_table *table, enum bpf_obj_type type)
>   {
> -	p_err("bpftool built without PID iterator support");
>   	return -ENOTSUP;
>   }
>   void delete_obj_refs_table(struct obj_refs_table *table) {}
>
Alexei Starovoitov July 13, 2020, 10:43 p.m. UTC | #2
On Fri, Jul 10, 2020 at 7:10 PM Yonghong Song <yhs@fb.com> wrote:
>
>
>
> On 7/10/20 4:26 PM, Andrii Nakryiko wrote:
> > Don't emit warning that bpftool was built without PID iterator support. This
> > error garbles JSON output of otherwise perfectly valid show commands.
> >
> > Reported-by: Andrey Ignatov <rdna@fb.com>
> > Signed-off-by: Andrii Nakryiko <andriin@fb.com>
>
> Thanks for the fix.
> Acked-by: Yonghong Song <yhs@fb.com>

Applied. Thanks
diff mbox series

Patch

diff --git a/tools/bpf/bpftool/pids.c b/tools/bpf/bpftool/pids.c
index c0d23ce4a6f4..e3b116325403 100644
--- a/tools/bpf/bpftool/pids.c
+++ b/tools/bpf/bpftool/pids.c
@@ -15,7 +15,6 @@ 
 
 int build_obj_refs_table(struct obj_refs_table *table, enum bpf_obj_type type)
 {
-	p_err("bpftool built without PID iterator support");
 	return -ENOTSUP;
 }
 void delete_obj_refs_table(struct obj_refs_table *table) {}