libbpf: Introduce errstr() for stringifying errno
authorMykyta Yatsenko <yatsenko@meta.com>
Mon, 11 Nov 2024 21:29:16 +0000 (21:29 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Nov 2024 04:29:20 +0000 (20:29 -0800)
commit1633a83bf993fa1eb8df26ec6043f77a2fe03245
tree24ea16186b877fe18f9751854baeb0bfb040db19
parent213a695297e1f0c2ed814488757d496b0d7f7267
libbpf: Introduce errstr() for stringifying errno

Add function errstr(int err) that allows converting numeric error codes
into string representations.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241111212919.368971-2-mykyta.yatsenko5@gmail.com
tools/lib/bpf/str_error.c
tools/lib/bpf/str_error.h