diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-06-20 02:16:58 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-06-23 03:01:48 +0300 |
commit | a479b8ce4ed1457f814be6f67a8447a9af38f235 (patch) | |
tree | 97b32b3d93bb6b56b76a5ec1846bafcf887efaf6 /tools/bpf/bpftool/main.h | |
parent | b7ddfab20a6af3a0e366000eada63adf6a7683e7 (diff) | |
download | linux-a479b8ce4ed1457f814be6f67a8447a9af38f235.tar.xz |
tools/bpftool: Move map/prog parsing logic into common
Move functions that parse map and prog by id/tag/name/etc outside of
map.c/prog.c, respectively. These functions are used outside of those files
and are generic enough to be in common. This also makes heavy-weight map.c and
prog.c more decoupled from the rest of bpftool files and facilitates more
lightweight bootstrap bpftool variant.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200619231703.738941-5-andriin@fb.com
Diffstat (limited to 'tools/bpf/bpftool/main.h')
-rw-r--r-- | tools/bpf/bpftool/main.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h index 5cdf0bc049bd..4338ab9d86d4 100644 --- a/tools/bpf/bpftool/main.h +++ b/tools/bpf/bpftool/main.h @@ -210,7 +210,9 @@ int do_iter(int argc, char **argv); int parse_u32_arg(int *argc, char ***argv, __u32 *val, const char *what); int prog_parse_fd(int *argc, char ***argv); +int prog_parse_fds(int *argc, char ***argv, int **fds); int map_parse_fd(int *argc, char ***argv); +int map_parse_fds(int *argc, char ***argv, int **fds); int map_parse_fd_and_info(int *argc, char ***argv, void *info, __u32 *info_len); struct bpf_prog_linfo; |