]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: remove duplicated error message on prog load
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 20 Jun 2018 18:42:45 +0000 (11:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Jun 2018 21:07:12 +0000 (23:07 +0200)
commit5e1c6bfd4c5024e4ff909796d46d41d0a3243c1b
tree407c66bf0df05519bb6f4daaf1a68bd6335e62ab
parent68db88e3aafc6072d309d3000a96d78a3cd6cf27
tools: bpftool: remove duplicated error message on prog load

do_pin_fd() will already print out an error message if something
goes wrong.  Printing another error is unnecessary and will break
JSON output, since error messages are full objects:

$ bpftool -jp prog load tracex1_kern.o /sys/fs/bpf/a
{
    "error": "can't pin the object (/sys/fs/bpf/a): File exists"
},{
    "error": "failed to pin program"
}

Fixes: cb5049c147aa ("bpftool: implement prog load command")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/prog.c