LKML Archive on
help / color / mirror / Atom feed
From: Punit Agrawal <>
	Punit Agrawal <>,
	Steven Rostedt <>
Subject: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
Date: Wed,  8 Sep 2021 08:07:10 +0900	[thread overview]
Message-ID: <> (raw)

While looking to build bootconfig tool in order to debug a kernel boot
time issue I noticed that tool fails to compile. The broken changes
were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
value and subkeys under a key").

Fix the compile issue by introducing a "ret" variable to track the
return value from xbc_node_compose_key().

Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
Signed-off-by: Punit Agrawal <>
Cc: Masami Hiramatsu <>
Cc: Steven Rostedt <>

(Apologies for the resend. I fat-fingered the email address for lkml)

Hi Masami,

I am not sure what went wrong but the patch in the lore link[0]
doesn't match the end result (bad merge?). You may want to recheck the
other changes to make sure it all looks sane.


 tools/bootconfig/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index f45fa992e01d..fd67496a947f 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -111,9 +111,11 @@ static void xbc_show_list(void)
 	char key[XBC_KEYLEN_MAX];
 	struct xbc_node *leaf;
 	const char *val;
+	int ret;
 	xbc_for_each_key_value(leaf, val) {
-		if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0) {
+		ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX);
+		if (ret < 0) {
 			fprintf(stderr, "Failed to compose key %d\n", ret);

             reply	other threads:[~2021-09-07 23:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 23:07 Punit Agrawal [this message]
2021-09-08  0:13 ` Masami Hiramatsu
2021-09-08  0:27   ` Steven Rostedt
2021-09-08  0:34   ` Masami Hiramatsu
2021-09-08  0:24 ` Steven Rostedt
2021-09-08  0:41   ` Masami Hiramatsu
2021-09-08  0:45     ` Steven Rostedt
2021-09-09  8:31       ` Punit Agrawal
2021-09-08  0:44 ` Steven Rostedt

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:

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

  git send-email \ \ \ \ \ \
    --subject='Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).