bpftool: Move out sections to separate functions
authorMichal Rostecki <mrostecki@opensuse.org>
Wed, 26 Feb 2020 16:59:35 +0000 (17:59 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 26 Feb 2020 17:34:34 +0000 (18:34 +0100)
commit6b52ca44e8af2c508ffbcd03261cf849a740756a
tree62ed3f4f1c03147954ee4574768e8d7a6a7bff3f
parent3494bec0f6ac8ac06e0ad7c35933db345b2c5a83
bpftool: Move out sections to separate functions

Remove all calls of print_end_then_start_section function and for loops
out from the do_probe function. Instead, provide separate functions for
each section (like i.e. section_helpers) which are called in do_probe.
This change is motivated by better readability.

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200226165941.6379-2-mrostecki@opensuse.org
tools/bpf/bpftool/feature.c