BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpftool: fix output for skipping kernel config check
@ 2022-12-06  4:35 Chethan Suresh
  2022-12-08 23:32 ` Andrii Nakryiko
  0 siblings, 1 reply; 6+ messages in thread
From: Chethan Suresh @ 2022-12-06  4:35 UTC (permalink / raw)
  To: quentin, bpf; +Cc: Chethan Suresh, Kenta Tada

When bpftool feature does not find kernel config files
under default path, 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>
---
 tools/bpf/bpftool/feature.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 36cf0f1517c9..316c4a01bdb7 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -487,14 +487,14 @@ static void probe_kernel_image_config(const char *define_prefix)
 	}
 
 end_parse:
-	if (file)
+	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]);
+		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]);
+		}
 	}
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH bpf-next] bpftool: fix output for skipping kernel config check
@ 2023-01-09  2:37 Chethan Suresh
  2023-01-09 10:19 ` Quentin Monnet
  2023-01-11  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 6+ messages in thread
From: Chethan Suresh @ 2023-01-09  2:37 UTC (permalink / raw)
  To: quentin, bpf; +Cc: Chethan Suresh, Kenta Tada

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>
---
 tools/bpf/bpftool/feature.c | 8 ++++----
 1 file 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)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-11  2:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06  4:35 [PATCH bpf-next] bpftool: fix output for skipping kernel config check Chethan Suresh
2022-12-08 23:32 ` Andrii Nakryiko
2022-12-13  4:42   ` Chethan Suresh
  -- strict thread matches above, loose matches on Subject: below --
2023-01-09  2:37 Chethan Suresh
2023-01-09 10:19 ` Quentin Monnet
2023-01-11  2:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox