tools: bpftool: For "feature probe" define "full_mode" bool as global
authorQuentin Monnet <quentin@isovalent.com>
Wed, 29 Apr 2020 14:45:04 +0000 (15:45 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 Apr 2020 21:25:11 +0000 (23:25 +0200)
commite3450b79dfe47632ffa65042c6d5a6b48263da4e
treefc8ec16eecc92c97f72c9b92fbc96bec5f9da2f9
parentfd9c40c575a023c6dc9faecce1af81a464615375
tools: bpftool: For "feature probe" define "full_mode" bool as global

The "full_mode" variable used for switching between full or partial
feature probing (i.e. with or without probing helpers that will log
warnings in kernel logs) was piped from the main do_probe() function
down to probe_helpers_for_progtype(), where it is needed.

Define it as a global variable: the calls will be more readable, and if
other similar flags were to be used in the future, we could use global
variables as well instead of extending again the list of arguments with
new flags.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200429144506.8999-2-quentin@isovalent.com
tools/bpf/bpftool/feature.c