Pārlūkot izejas kodu

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>
Arnaud Lacombe 14 gadi atpakaļ
vecāks
revīzija
ba6ff60d5e
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      scripts/kconfig/menu.c

+ 1 - 1
scripts/kconfig/menu.c

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