From d05ab6181be0060ca259a49e69de9bc95b19edb7 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Wed, 1 Oct 2025 10:13:23 -0700 Subject: libbpf: remove unused libbpf_strerror_r and STRERR_BUFSIZE libbpf_strerror_r() is not exposed as public API and neither is it used inside libbpf itself. Remove it altogether. Same for STRERR_BUFSIZE, it's just an orphaned leftover constant which we missed to clean up some time earlier. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20251001171326.3883055-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov Acked-by: Eduard Zingerman --- tools/lib/bpf/str_error.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tools/lib/bpf/str_error.h') diff --git a/tools/lib/bpf/str_error.h b/tools/lib/bpf/str_error.h index 53e7fbffc13e..d4c82eec034d 100644 --- a/tools/lib/bpf/str_error.h +++ b/tools/lib/bpf/str_error.h @@ -2,10 +2,6 @@ #ifndef __LIBBPF_STR_ERROR_H #define __LIBBPF_STR_ERROR_H -#define STRERR_BUFSIZE 128 - -char *libbpf_strerror_r(int err, char *dst, int len); - /** * @brief **libbpf_errstr()** returns string corresponding to numeric errno * @param err negative numeric errno -- cgit From c68b6fdc3600466e3c265bad34d099eb8c5280f1 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Wed, 1 Oct 2025 10:13:24 -0700 Subject: libbpf: move libbpf_errstr() into libbpf_utils.c Get rid of str_err.{c,h} by moving implementation of libbpf_errstr() into libbpf_utils.c and declarations into libbpf_internal.h. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20251001171326.3883055-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov Acked-by: Eduard Zingerman --- tools/lib/bpf/str_error.h | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 tools/lib/bpf/str_error.h (limited to 'tools/lib/bpf/str_error.h') diff --git a/tools/lib/bpf/str_error.h b/tools/lib/bpf/str_error.h deleted file mode 100644 index d4c82eec034d..000000000000 --- a/tools/lib/bpf/str_error.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ -#ifndef __LIBBPF_STR_ERROR_H -#define __LIBBPF_STR_ERROR_H - -/** - * @brief **libbpf_errstr()** returns string corresponding to numeric errno - * @param err negative numeric errno - * @return pointer to string representation of the errno, that is invalidated - * upon the next call. - */ -const char *libbpf_errstr(int err); - -#define errstr(err) libbpf_errstr(err) - -#endif /* __LIBBPF_STR_ERROR_H */ -- cgit