BPF List
 help / color / mirror / Atom feed
From: Chethan Suresh <chethan.suresh@sony.com>
To: quentin@isovalent.com, bpf@vger.kernel.org
Cc: Chethan Suresh <chethan.suresh@sony.com>,
	Kenta Tada <Kenta.Tada@sony.com>
Subject: [PATCH bpf-next] bpftool: fix output for skipping kernel config check
Date: Mon,  9 Jan 2023 08:07:42 +0530	[thread overview]
Message-ID: <20230109023742.29657-1-chethan.suresh@sony.com> (raw)

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


             reply	other threads:[~2023-01-09  2:38 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230109023742.29657-1-chethan.suresh@sony.com \
    --to=chethan.suresh@sony.com \
    --cc=Kenta.Tada@sony.com \
    --cc=bpf@vger.kernel.org \
    --cc=quentin@isovalent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox