kconfig: do not allow more than one symbol to have 'option modules'
[carl9170fw.git] / config / menu.c
index 3a9c674932607ca9c1bdc4d62a15a98829e9b213..c1d53200c306dc6202cbcc13555a05333c34411a 100644 (file)
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
 {
        switch (token) {
        case T_OPT_MODULES:
+               if (modules_sym)
+                       zconf_error("symbol '%s' redefines option 'modules'"
+                                   " already defined by symbol '%s'",
+                                   current_entry->sym->name,
+                                   modules_sym->name
+                                   );
                modules_sym = current_entry->sym;
                break;
        case T_OPT_DEFCONFIG_LIST: