Re: [PATCH 14/16] kconfig-allow-override.diff

Randy Dunlap
2007-04-01T19:09:01Z

On Sun, 1 Apr 2007 20:44:41 +0200 Sam Ravnborg wrote:

> This part of kconfig is taken care of by Roman Zippel.
> Kept the full mail for his reference.
>
> Sam

I certainly want this.

> On Sun, Apr 01, 2007 at 08:17:32PM +0200, Jan Engelhardt wrote:
> >
> > Allow config variables in .config to override earlier ones in the same
> > file. In other words,
> >
> > # CONFIG_SECURITY is not defined
> > CONFIG_SECURITY=y
> >
> > will activate it. This makes it a bit easier to do
> >
> > (cat original-config myconfig myconfig2 ... >.config)
> >
> > and run menuconfig as expected.
> >
> > Already posted at http://lkml.org/lkml/2006/10/25/81
> > Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> >
> > confdata.c | 14 +++++---------
> > 1 file changed, 5 insertions(+), 9 deletions(-)
> >
> > Index: linux-2.6.21-rc5/scripts/kconfig/confdata.c
> > ===================================================================
> > --- linux-2.6.21-rc5.orig/scripts/kconfig/confdata.c
> > +++ linux-2.6.21-rc5/scripts/kconfig/confdata.c
> > @@ -170,8 +170,7 @@ load:
> > sym->type = S_BOOLEAN;
> > }
> > if (sym->flags & def_flags) {
> > - conf_warning("trying to reassign symbol %s", sym->name);
> > - break;
> > + conf_warning("override: reassigning to symbol %s", sym->name);
> > }
> > switch (sym->type) {
> > case S_BOOLEAN:
> > @@ -210,8 +209,7 @@ load:
> > sym->type = S_OTHER;
> > }
> > if (sym->flags & def_flags) {
> > - conf_warning("trying to reassign symbol %s", sym->name);
> > - break;
> > + conf_warning("override: reassigning to symbol %s", sym->name);
> > }
> > switch (sym->type) {
> > case S_TRISTATE:
> > @@ -288,11 +286,9 @@ load:
> > }
> > break;
> > case yes:
> > - if (cs->def[def].tri != no) {
> > - conf_warning("%s creates inconsistent choice state", sym->name);
> > - cs->flags &= ~def_flags;
> > - } else
> > - cs->def[def].val = sym;
> > + if(cs->def[def].tri != no)
> > + conf_warning("override: %s turns state choice", sym->name);
> > + cs->def[def].val = sym;
> > break;
> > }
> > cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);
> > #<EOF>

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***