]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Migrate -1 err checks of libbpf fn calls
authorDave Marchevsky <davemarchevsky@fb.com>
Mon, 1 Nov 2021 22:43:54 +0000 (15:43 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 3 Nov 2021 18:22:30 +0000 (11:22 -0700)
commitcee9b8209ac9f26548f9ed7b13c6a39e2687cb0b
tree34e3664ffe802a7fc9a0aca94230071f1f714c7c
parent571f77f7238f91ace5b8e8c6276ebf1d09b29864
bpftool: Migrate -1 err checks of libbpf fn calls

Per [0], callers of libbpf functions with LIBBPF_STRICT_DIRECT_ERRS set
should handle negative error codes of various values (e.g. -EINVAL).
Migrate two callsites which were explicitly checking for -1 only to
handle the new scheme.

  [0]: https://github.com/libbpf/libbpf/wiki/Libbpf-1.0-migration-guide#direct-error-code-returning-libbpf_strict_direct_errs

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20211101224357.2651181-2-davemarchevsky@fb.com
tools/bpf/bpftool/btf_dumper.c
tools/bpf/bpftool/struct_ops.c