From: Sam Ravnborg <sam@ravnborg.org>
To: Michal Marek <mmarek@suse.cz>,
lkml <linux-kernel@vger.kernel.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 1/2] kconfig: fix savedefconfig for tristate choices
Date: Thu, 12 Aug 2010 09:11:51 +0200 [thread overview]
Message-ID: <1281597112-31019-1-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <20100812071023.GA11148@merkur.ravnborg.org>
savedefconfig failed to save choice symbols equal to 'y'
for tristate choices.
This resulted in this value being lost.
In particular is fixes an issue where
make ARCH=avr32 atngw100_defconfig
make ARCH=avr32 savedefconfig
cp defconfig arch/avr32/configs/atngw100_defconfig
make ARCH=avr32 atngw100_defconfig
diff -u .config .config.old
failed to produce an identical .config.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
scripts/kconfig/confdata.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f81f263..e5d66e4 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -497,7 +497,7 @@ int conf_write_defconfig(const char *filename)
/*
* If symbol is a choice value and equals to the
* default for a choice - skip.
- * But only if value equal to "y".
+ * But only if value is bool and equal to "y" .
*/
if (sym_is_choice_value(sym)) {
struct symbol *cs;
@@ -506,9 +506,8 @@ int conf_write_defconfig(const char *filename)
cs = prop_get_symbol(sym_get_choice_prop(sym));
ds = sym_choice_default(cs);
if (sym == ds) {
- if ((sym->type == S_BOOLEAN ||
- sym->type == S_TRISTATE) &&
- sym_get_tristate_value(sym) == yes)
+ if ((sym->type == S_BOOLEAN) &&
+ sym_get_tristate_value(sym) == yes)
goto next_menu;
}
}
--
1.6.0.6
next prev parent reply other threads:[~2010-08-12 7:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 7:10 [PATCH 0/2] kconfig: fixes for savedefconfig Sam Ravnborg
2010-08-12 7:11 ` Sam Ravnborg [this message]
2010-08-12 7:11 ` [PATCH 2/2] kconfig: fix tristate choice with minimal config Sam Ravnborg
2010-08-12 9:12 ` [PATCH 0/2] kconfig: fixes for savedefconfig Michal Marek
2010-08-12 19:33 ` Sam Ravnborg
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=1281597112-31019-1-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).