[KCONFIG] Optional choice values always get reset

Herbert Xu (herbert@gondor.apana.org.au)
Sat, 12 Jul 2003 17:30:18 +1000


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-6630-1057995238-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi:

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.

Cheers,

-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

--=_courier-6630-1057995238-0001-2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=p

Index: kernel-source-2.5/scripts/kconfig/confdata.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/scripts/kconfig/confdata.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 confdata.c --- kernel-source-2.5/scripts/kconfig/confdata.c 17 Jun 2003 04:20:26 -0000 1.1.1.3 +++ kernel-source-2.5/scripts/kconfig/confdata.c 12 Jul 2003 07:24:35 -0000 @@ -149,7 +149,7 @@ sym = sym_find(line + 7); if (!sym) { fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 7); - break; + continue; } switch (sym->type) { case S_TRISTATE: @@ -197,29 +197,28 @@ 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_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 = E_OR(cs->user.tri, sym->user.tri); + cs->flags &= ~SYMBOL_NEW; + } } fclose(in); @@ -241,7 +240,6 @@ 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;

--=_courier-6630-1057995238-0001-2--