]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge branch 'libbpf-stringify-error-codes-in-log-messages'
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Nov 2024 04:14:57 +0000 (20:14 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Nov 2024 04:29:46 +0000 (20:29 -0800)
Mykyta Yatsenko says:

====================
libbpf: stringify error codes in log messages

From: Mykyta Yatsenko <yatsenko@meta.com>

Libbpf may report error in 2 ways:
 1. Numeric errno
 2. Errno's text representation, returned by strerror
Both ways may be confusing for users: numeric code requires people to
know how to find its meaning and strerror may be too generic and
unclear.

These patches modify libbpf error reporting by swapping numeric codes
and strerror with the standard short error name, for example:
"failed to attach: -22" becomes "failed to attach: -EINVAL".
====================

Link: https://patch.msgid.link/20241111212919.368971-1-mykyta.yatsenko5@gmail.com
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>

Trivial merge