summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-08 22:12:45 -0700
committerSam Ravnborg <sam@mars.ravnborg.org>2006-06-09 07:31:30 +0200
commitface4374e288372fba67c865eb0c92337f50d5a4 (patch)
tree81a9535cc6af701a9fd1d23338449268498447ed /scripts/kconfig/confdata.c
parentf6a88aa86027bdecfc74ef7c6bf6c68233e86bb3 (diff)
downloadlinux-face4374e288372fba67c865eb0c92337f50d5a4.tar.gz
linux-face4374e288372fba67c865eb0c92337f50d5a4.tar.bz2
linux-face4374e288372fba67c865eb0c92337f50d5a4.zip
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.c26
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";
const char conf_defname[] = "arch/$ARCH/defconfig";
-const char *conf_confnames[] = {
- ".config",
- "/lib/modules/$UNAME_RELEASE/.config",
- "/etc/kernel-config",
- "/boot/config-$UNAME_RELEASE",
- conf_defname,
- NULL,
-};
-
static void conf_warning(const char *fmt, ...)
{
va_list ap;
@@ -98,16 +89,21 @@ int conf_read_simple(const char *name, int def)
if (name) {
in = zconf_fopen(name);
} else {
- const char **names = conf_confnames;
- name = *names++;
- if (!name)
- return 1;
+ struct property *prop;
+
+ name = conf_def_filename;
in = zconf_fopen(name);
if (in)
goto load;
sym_change_count++;
- while ((name = *names++)) {
- name = conf_expand_value(name);
+ if (!sym_defconfig_list)
+ return 1;
+
+ for_all_defaults(sym_defconfig_list, prop) {
+ if (expr_calc_value(prop->visible.expr) == no ||
+ prop->expr->type != E_SYMBOL)
+ continue;
+ name = conf_expand_value(prop->expr->left.sym->name);
in = zconf_fopen(name);
if (in) {
printf(_("#\n"