aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2003-07-25 01:50:07 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-25 01:50:07 -0700
commitbae79439f4bd0173e513a761b0719c87a6e0815d (patch)
tree5b4d13badf31a2a6258cdf8e4d1e34f9514c4bb0 /scripts
parent669ee167037e98290e81d84da328e03600203dbc (diff)
downloadhistory-bae79439f4bd0173e513a761b0719c87a6e0815d.tar.gz
[PATCH] Optional choice values get reset
Patch by Herbert Xu <herbert@gondor.apana.org.au>: As of 2.5.74, make oldconfig always disables existing optional choices even if they were selected previously. For example, if all the EICON ISDN drivers were selected as modules, then make oldconfig will turn them off. Part of the problem is that the choice value itself is computed before the SYMBOL_NEW flag is turned off. This patch addresses that particular problem.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 9ca70d081d1b3f..abbd6cf0188591 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -115,6 +115,7 @@ int conf_read(const char *name)
while (fgets(line, sizeof(line), in)) {
lineno++;
+ sym = NULL;
switch (line[0]) {
case '#':
if (memcmp(line + 2, "CONFIG_", 7))
@@ -133,7 +134,7 @@ int conf_read(const char *name)
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
- sym->user = symbol_no.curr;
+ sym->user.tri = no;
sym->flags &= ~SYMBOL_NEW;
break;
default:
@@ -201,35 +202,36 @@ int conf_read(const char *name)
default:
;
}
- if (sym_is_choice_value(sym)) {
- struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
- switch (sym->user.tri) {
- case mod:
- if (cs->user.tri == yes)
- /* warn? */;
- break;
- case yes:
- if (cs->user.tri != no)
- /* warn? */;
- cs->user.val = sym;
- break;
- case no:
- break;
- }
- cs->user.tri = sym->user.tri;
- }
break;
case '\n':
break;
default:
continue;
}
+ if (sym && sym_is_choice_value(sym)) {
+ struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
+ switch (sym->user.tri) {
+ case no:
+ break;
+ case mod:
+ if (cs->user.tri == yes)
+ /* warn? */;
+ break;
+ case yes:
+ if (cs->user.tri != no)
+ /* warn? */;
+ cs->user.val = sym;
+ break;
+ }
+ cs->user.tri = E_OR(cs->user.tri, sym->user.tri);
+ cs->flags &= ~SYMBOL_NEW;
+ }
}
fclose(in);
for_all_symbols(i, sym) {
sym_calc_value(sym);
- if (sym_has_value(sym)) {
+ if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
if (sym->visible == no)
sym->flags |= SYMBOL_NEW;
switch (sym->type) {
@@ -245,7 +247,6 @@ int conf_read(const char *name)
if (!sym_is_choice(sym))
continue;
prop = sym_get_choice_prop(sym);
- sym->flags &= ~SYMBOL_NEW;
for (e = prop->expr; e; e = e->left.expr)
if (e->right.sym->visible != no)
sym->flags |= e->right.sym->flags & SYMBOL_NEW;