summaryrefslogtreecommitdiff
path: root/package/config/nconf.c
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-02-02 14:59:18 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-02-02 15:54:50 +0100
commita72ab0542ff1dd8909ba5f1065627e41e3316b45 (patch)
tree0b6fe75709ffe7dbf821ed2b7ac038f8cd49510c /package/config/nconf.c
parenta538d4057e3add76889270ec097572223b11ba07 (diff)
package/config: rebase against 2.6.38-rc3
Fixes nconfig crash on comments within choice groups. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/config/nconf.c')
-rw-r--r--package/config/nconf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/package/config/nconf.c b/package/config/nconf.c
index 272a987f2..db5637739 100644
--- a/package/config/nconf.c
+++ b/package/config/nconf.c
@@ -248,7 +248,7 @@ search_help[] = N_(
"Only relevant lines are shown.\n"
"\n\n"
"Search examples:\n"
-"Examples: USB = > find all symbols containing USB\n"
+"Examples: USB => find all symbols containing USB\n"
" ^USB => find all symbols starting with USB\n"
" USB$ => find all symbols ending with USB\n"
"\n");
@@ -1266,9 +1266,13 @@ static void conf_choice(struct menu *menu)
if (child->sym == sym_get_choice_value(menu->sym))
item_make(child, ':', "<X> %s",
_(menu_get_prompt(child)));
- else
+ else if (child->sym)
item_make(child, ':', " %s",
_(menu_get_prompt(child)));
+ else
+ item_make(child, ':', "*** %s ***",
+ _(menu_get_prompt(child)));
+
if (child->sym == active){
last_top_row = top_row(curses_menu);
selected_index = i;
@@ -1334,7 +1338,7 @@ static void conf_choice(struct menu *menu)
break;
child = item_data();
- if (!child || !menu_is_visible(child))
+ if (!child || !menu_is_visible(child) || !child->sym)
continue;
switch (res) {
case ' ':