kconfig: don't emit warning upon rootmenu's prompt redefinition

This silences the warning printed upon prompt redefinition for the rootmenu.
We will encounter this redefinition when a "mainmenu" statement is specified and
override the default prompt.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Arnaud Lacombe 2010-09-04 16:05:15 -04:00
parent 0954828fcb
commit ba6ff60d5e

View File

@ -139,7 +139,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
while (isspace(*prompt)) while (isspace(*prompt))
prompt++; prompt++;
} }
if (current_entry->prompt) if (current_entry->prompt && current_entry != &rootmenu)
prop_warn(prop, "prompt redefined"); prop_warn(prop, "prompt redefined");
current_entry->prompt = prop; current_entry->prompt = prop;
} }