aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.y
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-09-03 11:07:18 -0400
committerMichal Marek <mmarek@suse.cz>2013-09-05 05:09:17 -0400
commit6902dccfda005fa4c42410fa064fdd331ab42479 (patch)
tree48b9df40035a8bf414350ed84c6bcb4438e4ace0 /scripts/kconfig/zconf.y
parentc8272faf5e3f0f97f5cd15af69e3a515efbe212d (diff)
kconfig: do not special-case 'MODULES' symbol
Currently, the 'MODULES' symbol is hard-coded to be the default symbol that enables/disables tristates, if no other symbol was declared with 'option modules'. While this used to be needed for the Linux kernel, we now have an explicit 'option modules' attached to the 'MODULES' symbol (since cset 11097a036), so we no longer need to special-case it in the kconfig code. Furthermore, kconfig is extensively used out of the Linux kernel, and other projects may have another meaning for a symbol named 'MODULES'. This patch changes the way we enable/disable tristates: if a symbol was found with 'option modules' attached to it, then that symbol controls enabling tristates. Otherwise, tristates are disabled, even if a symbol named 'MODULES' exists. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/zconf.y')
-rw-r--r--scripts/kconfig/zconf.y11
1 files changed, 2 insertions, 9 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 864da07ba4aa..0653886fac48 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -493,9 +493,6 @@ void conf_parse(const char *name)
493 493
494 sym_init(); 494 sym_init();
495 _menu_init(); 495 _menu_init();
496 modules_sym = sym_lookup(NULL, 0);
497 modules_sym->type = S_BOOLEAN;
498 modules_sym->flags |= SYMBOL_AUTO;
499 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); 496 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
500 497
501 if (getenv("ZCONF_DEBUG")) 498 if (getenv("ZCONF_DEBUG"))
@@ -503,12 +500,8 @@ void conf_parse(const char *name)
503 zconfparse(); 500 zconfparse();
504 if (zconfnerrs) 501 if (zconfnerrs)
505 exit(1); 502 exit(1);
506 if (!modules_sym->prop) { 503 if (!modules_sym)
507 struct property *prop; 504 modules_sym = sym_find( "n" );
508
509 prop = prop_alloc(P_DEFAULT, modules_sym);
510 prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
511 }
512 505
513 rootmenu.prompt->text = _(rootmenu.prompt->text); 506 rootmenu.prompt->text = _(rootmenu.prompt->text);
514 rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); 507 rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);