bpftool: Expose attach_type-to-string array to non-cgroup code
authorAndrii Nakryiko <andriin@fb.com>
Wed, 29 Apr 2020 00:16:11 +0000 (17:16 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 29 Apr 2020 00:27:08 +0000 (17:27 -0700)
commit50325b1761e31ad17d252e795af72a9af8c5a7d7
tree8906e3ed16ed15ff936df0460050ce4459645ecd
parent2c2837b09e9ab4874353186599609fa2e1ccabce
bpftool: Expose attach_type-to-string array to non-cgroup code

Move attach_type_strings into main.h for access in non-cgroup code.
bpf_attach_type is used for non-cgroup attach types quite widely now. So also
complete missing string translations for non-cgroup attach types.

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/20200429001614.1544-8-andriin@fb.com
tools/bpf/bpftool/cgroup.c
tools/bpf/bpftool/main.h