aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf_util.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-05-15 20:39:27 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-05-16 12:47:47 -0700
commitd72386fe7a8472f859333b078fd8bb9d254d51f2 (patch)
tree20f609d352a3001eb8bc55d8abbe4dbc71d3ef4b /tools/lib/bpf/libbpf_util.h
parenttools/bpftool: move set_max_rlimit() before __bpf_object__open_xattr() (diff)
downloadlinux-dev-d72386fe7a8472f859333b078fd8bb9d254d51f2.tar.xz
linux-dev-d72386fe7a8472f859333b078fd8bb9d254d51f2.zip
libbpf: move logging helpers into libbpf_internal.h
libbpf_util.h header was recently exposed as public as a dependency of xsk.h. In addition to memory barriers, it contained logging helpers, which are not supposed to be exposed. This patch moves those into libbpf_internal.h, which is kept as an internal header. Cc: Stanislav Fomichev <sdf@google.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Fixes: 7080da890984 ("libbpf: add libbpf_util.h to header install.") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf_util.h')
-rw-r--r--tools/lib/bpf/libbpf_util.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/lib/bpf/libbpf_util.h b/tools/lib/bpf/libbpf_util.h
index da94c4cb2e4d..59c779c5790c 100644
--- a/tools/lib/bpf/libbpf_util.h
+++ b/tools/lib/bpf/libbpf_util.h
@@ -10,19 +10,6 @@
extern "C" {
#endif
-extern void libbpf_print(enum libbpf_print_level level,
- const char *format, ...)
- __attribute__((format(printf, 2, 3)));
-
-#define __pr(level, fmt, ...) \
-do { \
- libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \
-} while (0)
-
-#define pr_warning(fmt, ...) __pr(LIBBPF_WARN, fmt, ##__VA_ARGS__)
-#define pr_info(fmt, ...) __pr(LIBBPF_INFO, fmt, ##__VA_ARGS__)
-#define pr_debug(fmt, ...) __pr(LIBBPF_DEBUG, fmt, ##__VA_ARGS__)
-
/* Use these barrier functions instead of smp_[rw]mb() when they are
* used in a libbpf header file. That way they can be built into the
* application that uses libbpf.