aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-09-03 16:22:26 -0400
committerMichal Marek <mmarek@suse.cz>2013-09-05 05:10:08 -0400
commite062781397e5bebc6c1b8dd4bf466136e13ae4c5 (patch)
tree0d0a9232e2480a8a2c2d7f3931697c63ce7da847 /scripts
parentc80de52d30304a4de296e687665b5d18a9026942 (diff)
kconfig: do not allow more than one symbol to have 'option modules'
Previously, it was possible to have more than one symbol with the 'option modules' attached to them, although only the last one would in fact control tristates. Since this does not make much sense, only allow at most one symbol to control tristates. Note: it is still possible to have more than one symbol that control tristates, but indirectly: config MOD1 bool "mod1" select MODULES config MOD2 bool "mod2" select MODULES config MODULES bool option modules 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')
-rw-r--r--scripts/kconfig/menu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3a9c67493260..c1d53200c306 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
199{ 199{
200 switch (token) { 200 switch (token) {
201 case T_OPT_MODULES: 201 case T_OPT_MODULES:
202 if (modules_sym)
203 zconf_error("symbol '%s' redefines option 'modules'"
204 " already defined by symbol '%s'",
205 current_entry->sym->name,
206 modules_sym->name
207 );
202 modules_sym = current_entry->sym; 208 modules_sym = current_entry->sym;
203 break; 209 break;
204 case T_OPT_DEFCONFIG_LIST: 210 case T_OPT_DEFCONFIG_LIST: