diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-09 01:12:45 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-06-09 01:31:30 -0400 |
commit | face4374e288372fba67c865eb0c92337f50d5a4 (patch) | |
tree | 81a9535cc6af701a9fd1d23338449268498447ed /scripts/kconfig/confdata.c | |
parent | f6a88aa86027bdecfc74ef7c6bf6c68233e86bb3 (diff) |
kconfig: add defconfig_list/module option
This makes it possible to change two options which were hardcoded sofar.
1. Any symbol can now take the role of CONFIG_MODULES
2. The more useful option is to change the list of default file names,
which kconfig uses to load the base configuration if .config isn't
available.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r-- | scripts/kconfig/confdata.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index e28cd0c2ca08..5bd66f451189 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -25,15 +25,6 @@ const char conf_def_filename[] = ".config"; | |||
25 | 25 | ||
26 | const char conf_defname[] = "arch/$ARCH/defconfig"; | 26 | const char conf_defname[] = "arch/$ARCH/defconfig"; |
27 | 27 | ||
28 | const char *conf_confnames[] = { | ||
29 | ".config", | ||
30 | "/lib/modules/$UNAME_RELEASE/.config", | ||
31 | "/etc/kernel-config", | ||
32 | "/boot/config-$UNAME_RELEASE", | ||
33 | conf_defname, | ||
34 | NULL, | ||
35 | }; | ||
36 | |||
37 | static void conf_warning(const char *fmt, ...) | 28 | static void conf_warning(const char *fmt, ...) |
38 | { | 29 | { |
39 | va_list ap; | 30 | va_list ap; |
@@ -98,16 +89,21 @@ int conf_read_simple(const char *name, int def) | |||
98 | if (name) { | 89 | if (name) { |
99 | in = zconf_fopen(name); | 90 | in = zconf_fopen(name); |
100 | } else { | 91 | } else { |
101 | const char **names = conf_confnames; | 92 | struct property *prop; |
102 | name = *names++; | 93 | |
103 | if (!name) | 94 | name = conf_def_filename; |
104 | return 1; | ||
105 | in = zconf_fopen(name); | 95 | in = zconf_fopen(name); |
106 | if (in) | 96 | if (in) |
107 | goto load; | 97 | goto load; |
108 | sym_change_count++; | 98 | sym_change_count++; |
109 | while ((name = *names++)) { | 99 | if (!sym_defconfig_list) |
110 | name = conf_expand_value(name); | 100 | return 1; |
101 | |||
102 | for_all_defaults(sym_defconfig_list, prop) { | ||
103 | if (expr_calc_value(prop->visible.expr) == no || | ||
104 | prop->expr->type != E_SYMBOL) | ||
105 | continue; | ||
106 | name = conf_expand_value(prop->expr->left.sym->name); | ||
111 | in = zconf_fopen(name); | 107 | in = zconf_fopen(name); |
112 | if (in) { | 108 | if (in) { |
113 | printf(_("#\n" | 109 | printf(_("#\n" |