aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2010-08-12 03:11:51 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-12 04:55:02 -0400
commit801690caf1894d4f8b1277ca9f5dcf0bcf9b3f58 (patch)
tree921c4d4a1b9ada1ef0822ac26c5da2dbb83bb5f3 /scripts
parent7a996d3ab150bb0e1b71fa182f70199a703efdd1 (diff)
kconfig: fix savedefconfig for tristate choices
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> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f81f263b64f2..e5d66e4f1484 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -497,7 +497,7 @@ int conf_write_defconfig(const char *filename)
497 /* 497 /*
498 * If symbol is a choice value and equals to the 498 * If symbol is a choice value and equals to the
499 * default for a choice - skip. 499 * default for a choice - skip.
500 * But only if value equal to "y". 500 * But only if value is bool and equal to "y" .
501 */ 501 */
502 if (sym_is_choice_value(sym)) { 502 if (sym_is_choice_value(sym)) {
503 struct symbol *cs; 503 struct symbol *cs;
@@ -506,9 +506,8 @@ int conf_write_defconfig(const char *filename)
506 cs = prop_get_symbol(sym_get_choice_prop(sym)); 506 cs = prop_get_symbol(sym_get_choice_prop(sym));
507 ds = sym_choice_default(cs); 507 ds = sym_choice_default(cs);
508 if (sym == ds) { 508 if (sym == ds) {
509 if ((sym->type == S_BOOLEAN || 509 if ((sym->type == S_BOOLEAN) &&
510 sym->type == S_TRISTATE) && 510 sym_get_tristate_value(sym) == yes)
511 sym_get_tristate_value(sym) == yes)
512 goto next_menu; 511 goto next_menu;
513 } 512 }
514 } 513 }