summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2005-11-08 21:34:49 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:55:53 -0800
commit90389160efc2864501ced6e662f9419eb7a3e6c8 (patch)
tree3b2957a7540bf9e78ef106fe606945e435fab957 /scripts/kconfig/confdata.c
parent3f23ca2b37d13a89bb6cd0421821fc9c3b8ccd47 (diff)
downloadop-kernel-dev-90389160efc2864501ced6e662f9419eb7a3e6c8.zip
op-kernel-dev-90389160efc2864501ced6e662f9419eb7a3e6c8.tar.gz
[PATCH] kconfig: preset config during all*config
Allow to force setting of config variables during all{no,mod,yes,random}config to a specific value. For that conf first checks the KCONFIG_ALLCONFIG environment variable for a file name, otherwise it checks for all{no,mod,yes,random}.config and all.config. The file is a normal config file, which presets the config variables, but they are still subject to normal dependency checks. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r--scripts/kconfig/confdata.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 02f670c..4bba620 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -69,15 +69,13 @@ char *conf_get_default_confname(void)
return name;
}
-int conf_read(const char *name)
+int conf_read_simple(const char *name)
{
FILE *in = NULL;
char line[1024];
char *p, *p2;
int lineno = 0;
struct symbol *sym;
- struct property *prop;
- struct expr *e;
int i;
if (name) {
@@ -232,6 +230,19 @@ int conf_read(const char *name)
if (modules_sym)
sym_calc_value(modules_sym);
+ return 0;
+}
+
+int conf_read(const char *name)
+{
+ struct symbol *sym;
+ struct property *prop;
+ struct expr *e;
+ int i;
+
+ if (conf_read_simple(name))
+ return 1;
+
for_all_symbols(i, sym) {
sym_calc_value(sym);
if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
OpenPOWER on IntegriCloud