diff options
| author | Xin Liu <[email protected]> | 2022-12-10 16:20:45 +0800 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-12-14 18:39:33 +0100 |
| commit | c9883ee9d110703ccb3dfe2ca13e0b7a01351077 (patch) | |
| tree | 98c9d223d38b5090aca23c78b62fbe81466fc339 /tools/perf/scripts/python | |
| parent | 7e68dd7d07a28faa2e6574dd6b9dbd90cdeaae91 (diff) | |
libbpf: Optimized return value in libbpf_strerror when errno is libbpf errno
This is a small improvement in libbpf_strerror. When libbpf_strerror
is used to obtain the system error description, if the length of the
buf is insufficient, libbpf_sterror returns ERANGE and sets errno to
ERANGE.
However, this processing is not performed when the error code
customized by libbpf is obtained. Make some minor improvements here,
return -ERANGE and set errno to ERANGE when buf is not enough for
custom description.
Signed-off-by: Xin Liu <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions