]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - scripts/kconfig/zconf.y
be2net: Fix to avoid firmware update when interface is not open.
[net-next-2.6.git] / scripts / kconfig / zconf.y
index 23dfd3baa7a1ba906c80a0df0383fbfcf8979bad..2abd3c7ff15d91d25679a4cec6f1ff21da38fb23 100644 (file)
@@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry;
 #define YYERROR_VERBOSE
 #endif
 %}
-%expect 26
+%expect 28
 
 %union
 {
@@ -104,14 +104,15 @@ static struct menu *current_menu, *current_entry;
 %}
 
 %%
-input: stmt_list;
+input: nl start | start;
+
+start: mainmenu_stmt stmt_list | stmt_list;
 
 stmt_list:
          /* empty */
        | stmt_list common_stmt
        | stmt_list choice_stmt
        | stmt_list menu_stmt
-       | stmt_list T_MAINMENU prompt nl
        | stmt_list end                 { zconf_error("unexpected end statement"); }
        | stmt_list T_WORD error T_EOL  { zconf_error("unknown statement \"%s\"", $2); }
        | stmt_list option_name error T_EOL
@@ -342,6 +343,13 @@ if_block:
        | if_block choice_stmt
 ;
 
+/* mainmenu entry */
+
+mainmenu_stmt: T_MAINMENU prompt nl
+{
+       menu_add_prompt(P_MENU, $2, NULL);
+};
+
 /* menu entry */
 
 menu: T_MENU prompt T_EOL
@@ -494,6 +502,10 @@ void conf_parse(const char *name)
                prop = prop_alloc(P_DEFAULT, modules_sym);
                prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
        }
+
+       rootmenu.prompt->text = _(rootmenu.prompt->text);
+       rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
+
        menu_finalize(&rootmenu);
        for_all_symbols(i, sym) {
                if (sym_check_deps(sym))