summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorChethan Suresh <chethan.suresh@sony.com>2023-01-09 08:07:42 +0530
committerMartin KaFai Lau <martin.lau@kernel.org>2023-01-10 17:42:31 -0800
commit75514e4c661962cbbad869a1b5855dbce0f1aba2 (patch)
treed88b245f81f7422aad732675b1ac24aee6b084d0 /tools/bpf
parent9cb61e50bf6bf54db712bba6cf20badca4383f96 (diff)
bpftool: fix output for skipping kernel config check
When bpftool feature does not find kernel config files under default path or wrong format, do not output CONFIG_XYZ is not set. Skip kernel config check and continue. Signed-off-by: Chethan Suresh <chethan.suresh@sony.com> Signed-off-by: Kenta Tada <Kenta.Tada@sony.com> Acked-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/r/20230109023742.29657-1-chethan.suresh@sony.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/feature.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 36cf0f1517c9..da16e6a27ccc 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -486,16 +486,16 @@ static void probe_kernel_image_config(const char *define_prefix)
}
}
-end_parse:
- if (file)
- gzclose(file);
-
for (i = 0; i < ARRAY_SIZE(options); i++) {
if (define_prefix && !options[i].macro_dump)
continue;
print_kernel_option(options[i].name, values[i], define_prefix);
free(values[i]);
}
+
+end_parse:
+ if (file)
+ gzclose(file);
}
static bool probe_bpf_syscall(const char *define_prefix)