Skip to content

Commit

Permalink
kconfig: fix savedefconfig for tristate choices
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
sravnborg authored and michal42 committed Aug 12, 2010
1 parent 7a996d3 commit 801690c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 801690c

Please sign in to comment.