lkml.org 
[lkml]   [2007]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Allow kconfig to accept overrides

On Oct 18 2007 15:29, Sam Ravnborg wrote:
>> Yeah, I've put in
>> ("override: %s changes choice state", sym->name);
>> this morning.
>Care to send me the updated patch.
>

===
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.

Posted at:
http://lkml.org/lkml/2006/10/25/81
http://lkml.org/lkml/2007/4/1/175

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>

---
scripts/kconfig/confdata.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

Index: linux-2.6.23.1/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6.23.1.orig/scripts/kconfig/confdata.c
+++ linux-2.6.23.1/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 changes choice state", sym->name);
+ cs->def[def].val = sym;
break;
}
cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-10-18 15:35    [W:0.489 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site