Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit af0efa05 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Andrii Nakryiko
Browse files

libbpf: Restore errno return for functions that were already returning it

The update to streamline libbpf error reporting intended to change all
functions to return the errno as a negative return value if
LIBBPF_STRICT_DIRECT_ERRS is set. However, if the flag is *not* set, the
return value changes for the two functions that were already returning a
negative errno unconditionally: bpf_link__unpin() and perf_buffer__poll().

This is a user-visible API change that breaks applications; so let's revert
these two functions back to unconditionally returning a negative errno
value.

Fixes: e9fc3ce9

 ("libbpf: Streamline error reporting for high-level APIs")
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210706122355.236082-1-toke@redhat.com
parent bc832065
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment