aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
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";
25 25
26const char conf_defname[] = "arch/$ARCH/defconfig"; 26const char conf_defname[] = "arch/$ARCH/defconfig";
27 27
28const 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
37static void conf_warning(const char *fmt, ...) 28static 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"