tools, bpftool: Poison and replace kernel integer typedefs

Replace the use of kernel-only integer typedefs (u8, u32, etc.) by their
user space counterpart (__u8, __u32, etc.).

Similarly to what libbpf does, poison the typedefs to avoid introducing
them again in the future.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200511161536.29853-2-quentin@isovalent.com
This commit is contained in:
Quentin Monnet
2020-05-11 17:15:33 +01:00
committed by Daniel Borkmann
parent 385bbf7b11
commit 6e7e034e88
5 changed files with 9 additions and 6 deletions

View File

@@ -238,7 +238,7 @@ exit_free:
return fd;
}
static void show_prog_maps(int fd, u32 num_maps)
static void show_prog_maps(int fd, __u32 num_maps)
{
struct bpf_prog_info info = {};
__u32 len = sizeof(info);