aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-10-03 18:26:42 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-04 10:04:16 -0400
commiteff8190880c005e754d7d1bd315fc53a3ae9f876 (patch)
tree56362c9ce6f63cf20f2e9bd88745658d783529ba
parent24d6a8084259e22acf9a80d4de3606a031f42f6d (diff)
libbpf: Make include guards consistent
Rename include guards to have consistent names "__LIBBPF_<header_name>". Signed-off-by: Andrey Ignatov <rdna@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--tools/lib/bpf/bpf.h6
-rw-r--r--tools/lib/bpf/btf.h6
-rw-r--r--tools/lib/bpf/libbpf.h6
-rw-r--r--tools/lib/bpf/nlattr.h6
-rw-r--r--tools/lib/bpf/str_error.h6
5 files changed, 15 insertions, 15 deletions
diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h
index 6f38164b2618..4c78f61b7c71 100644
--- a/tools/lib/bpf/bpf.h
+++ b/tools/lib/bpf/bpf.h
@@ -20,8 +20,8 @@
20 * You should have received a copy of the GNU Lesser General Public 20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this program; if not, see <http://www.gnu.org/licenses> 21 * License along with this program; if not, see <http://www.gnu.org/licenses>
22 */ 22 */
23#ifndef __BPF_BPF_H 23#ifndef __LIBBPF_BPF_H
24#define __BPF_BPF_H 24#define __LIBBPF_BPF_H
25 25
26#include <linux/bpf.h> 26#include <linux/bpf.h>
27#include <stdbool.h> 27#include <stdbool.h>
@@ -111,4 +111,4 @@ int bpf_load_btf(void *btf, __u32 btf_size, char *log_buf, __u32 log_buf_size,
111int bpf_task_fd_query(int pid, int fd, __u32 flags, char *buf, __u32 *buf_len, 111int bpf_task_fd_query(int pid, int fd, __u32 flags, char *buf, __u32 *buf_len,
112 __u32 *prog_id, __u32 *fd_type, __u64 *probe_offset, 112 __u32 *prog_id, __u32 *fd_type, __u64 *probe_offset,
113 __u64 *probe_addr); 113 __u64 *probe_addr);
114#endif 114#endif /* __LIBBPF_BPF_H */
diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/btf.h
index 4897e0724d4e..d5d20682eeb6 100644
--- a/tools/lib/bpf/btf.h
+++ b/tools/lib/bpf/btf.h
@@ -1,8 +1,8 @@
1/* SPDX-License-Identifier: LGPL-2.1 */ 1/* SPDX-License-Identifier: LGPL-2.1 */
2/* Copyright (c) 2018 Facebook */ 2/* Copyright (c) 2018 Facebook */
3 3
4#ifndef __BPF_BTF_H 4#ifndef __LIBBPF_BTF_H
5#define __BPF_BTF_H 5#define __LIBBPF_BTF_H
6 6
7#include <linux/types.h> 7#include <linux/types.h>
8 8
@@ -23,4 +23,4 @@ int btf__resolve_type(const struct btf *btf, __u32 type_id);
23int btf__fd(const struct btf *btf); 23int btf__fd(const struct btf *btf);
24const char *btf__name_by_offset(const struct btf *btf, __u32 offset); 24const char *btf__name_by_offset(const struct btf *btf, __u32 offset);
25 25
26#endif 26#endif /* __LIBBPF_BTF_H */
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 710ff5724980..28f83dd6022b 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -20,8 +20,8 @@
20 * You should have received a copy of the GNU Lesser General Public 20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this program; if not, see <http://www.gnu.org/licenses> 21 * License along with this program; if not, see <http://www.gnu.org/licenses>
22 */ 22 */
23#ifndef __BPF_LIBBPF_H 23#ifndef __LIBBPF_LIBBPF_H
24#define __BPF_LIBBPF_H 24#define __LIBBPF_LIBBPF_H
25 25
26#include <stdio.h> 26#include <stdio.h>
27#include <stdint.h> 27#include <stdint.h>
@@ -315,4 +315,4 @@ int libbpf_nl_get_qdisc(int sock, unsigned int nl_pid, int ifindex,
315 libbpf_dump_nlmsg_t dump_qdisc_nlmsg, void *cookie); 315 libbpf_dump_nlmsg_t dump_qdisc_nlmsg, void *cookie);
316int libbpf_nl_get_filter(int sock, unsigned int nl_pid, int ifindex, int handle, 316int libbpf_nl_get_filter(int sock, unsigned int nl_pid, int ifindex, int handle,
317 libbpf_dump_nlmsg_t dump_filter_nlmsg, void *cookie); 317 libbpf_dump_nlmsg_t dump_filter_nlmsg, void *cookie);
318#endif 318#endif /* __LIBBPF_LIBBPF_H */
diff --git a/tools/lib/bpf/nlattr.h b/tools/lib/bpf/nlattr.h
index 755a3312c87f..7198584a3040 100644
--- a/tools/lib/bpf/nlattr.h
+++ b/tools/lib/bpf/nlattr.h
@@ -11,8 +11,8 @@
11 * Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch> 11 * Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
12 */ 12 */
13 13
14#ifndef __NLATTR_H 14#ifndef __LIBBPF_NLATTR_H
15#define __NLATTR_H 15#define __LIBBPF_NLATTR_H
16 16
17#include <stdint.h> 17#include <stdint.h>
18#include <linux/netlink.h> 18#include <linux/netlink.h>
@@ -108,4 +108,4 @@ int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype,
108 108
109int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh); 109int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh);
110 110
111#endif /* __NLATTR_H */ 111#endif /* __LIBBPF_NLATTR_H */
diff --git a/tools/lib/bpf/str_error.h b/tools/lib/bpf/str_error.h
index 998eff7d6710..b9157f5eebde 100644
--- a/tools/lib/bpf/str_error.h
+++ b/tools/lib/bpf/str_error.h
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: LGPL-2.1 1// SPDX-License-Identifier: LGPL-2.1
2#ifndef BPF_STR_ERROR 2#ifndef __LIBBPF_STR_ERROR_H
3#define BPF_STR_ERROR 3#define __LIBBPF_STR_ERROR_H
4 4
5char *libbpf_strerror_r(int err, char *dst, int len); 5char *libbpf_strerror_r(int err, char *dst, int len);
6#endif // BPF_STR_ERROR 6#endif /* __LIBBPF_STR_ERROR_H */