aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/menu.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index a8afce24fb1b..c86c27f2c761 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -114,7 +114,7 @@ void menu_set_type(int type)
114 sym->type = type; 114 sym->type = type;
115 return; 115 return;
116 } 116 }
117 menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n", 117 menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'",
118 sym->name ? sym->name : "<choice>", 118 sym->name ? sym->name : "<choice>",
119 sym_type_name(sym->type), sym_type_name(type)); 119 sym_type_name(sym->type), sym_type_name(type));
120} 120}
@@ -124,15 +124,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
124 struct property *prop = prop_alloc(type, current_entry->sym); 124 struct property *prop = prop_alloc(type, current_entry->sym);
125 125
126 prop->menu = current_entry; 126 prop->menu = current_entry;
127 prop->text = prompt;
128 prop->expr = expr; 127 prop->expr = expr;
129 prop->visible.expr = menu_check_dep(dep); 128 prop->visible.expr = menu_check_dep(dep);
130 129
131 if (prompt) { 130 if (prompt) {
131 if (isspace(*prompt)) {
132 prop_warn(prop, "leading whitespace ignored");
133 while (isspace(*prompt))
134 prompt++;
135 }
132 if (current_entry->prompt) 136 if (current_entry->prompt)
133 menu_warn(current_entry, "prompt redefined\n"); 137 prop_warn(prop, "prompt redefined");
134 current_entry->prompt = prop; 138 current_entry->prompt = prop;
135 } 139 }
140 prop->text = prompt;
136 141
137 return prop; 142 return prop;
138} 143}
@@ -343,11 +348,10 @@ void menu_finalize(struct menu *parent)
343 348
344 if (sym && !(sym->flags & SYMBOL_WARNED)) { 349 if (sym && !(sym->flags & SYMBOL_WARNED)) {
345 if (sym->type == S_UNKNOWN) 350 if (sym->type == S_UNKNOWN)
346 menu_warn(parent, "config symbol defined " 351 menu_warn(parent, "config symbol defined without type");
347 "without type\n");
348 352
349 if (sym_is_choice(sym) && !parent->prompt) 353 if (sym_is_choice(sym) && !parent->prompt)
350 menu_warn(parent, "choice must have a prompt\n"); 354 menu_warn(parent, "choice must have a prompt");
351 355
352 /* Check properties connected to this symbol */ 356 /* Check properties connected to this symbol */
353 sym_check_prop(sym); 357 sym_check_prop(sym);