summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/str_error.h
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-10-03 15:26:41 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-04 16:04:16 +0200
commit24d6a8084259e22acf9a80d4de3606a031f42f6d (patch)
tree83b8a37d3bb78e8cf2a0ea90ebe88faeb4c5eb90 /tools/lib/bpf/str_error.h
parentf04bc8a436e1b32f842a631ff889954bdf56b720 (diff)
libbpf: Consistent prefixes for interfaces in str_error.h.
libbpf is used more and more outside kernel tree. That means the library should follow good practices in library design and implementation to play well with third party code that uses it. One of such practices is to have a common prefix (or a few) for every interface, function or data structure, library provides. I helps to avoid name conflicts with other libraries and keeps API consistent. Inconsistent names in libbpf already cause problems in real life. E.g. an application can't use both libbpf and libnl due to conflicting symbols. Having common prefix will help to fix current and avoid future problems. libbpf already uses the following prefixes for its interfaces: * bpf_ for bpf system call wrappers, program/map/elf-object abstractions and a few other things; * btf_ for BTF related API; * libbpf_ for everything else. The patch renames function in str_error.h to have libbpf_ prefix since it misses one and doesn't fit well into the first two categories. Signed-off-by: Andrey Ignatov <rdna@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/str_error.h')
-rw-r--r--tools/lib/bpf/str_error.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/str_error.h b/tools/lib/bpf/str_error.h
index 355b1db571d1..998eff7d6710 100644
--- a/tools/lib/bpf/str_error.h
+++ b/tools/lib/bpf/str_error.h
@@ -2,5 +2,5 @@
#ifndef BPF_STR_ERROR
#define BPF_STR_ERROR
-char *str_error(int err, char *dst, int len);
+char *libbpf_strerror_r(int err, char *dst, int len);
#endif // BPF_STR_ERROR