aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMatej Laitl <strohel@gmail.com>2007-10-02 16:46:50 -0400
committerSam Ravnborg <sam@neptun.(none)>2007-10-12 15:20:33 -0400
commitb5d609dbfa3f5a4726ef26cfd8023651aafdfb3b (patch)
tree513c1794d235b6ebd0afc15b4cc597fbf0cc8724 /scripts/kconfig
parenta5bf3d891a6a0fb5aa122792d965e3774108b923 (diff)
kconfig/menuconfig: distinguish between selected-by-another options and comments
menuconfig currently represents options implied by another option ('select' directive in Kconfig) by prefixing them with '---'. Unfortunately the same notation is used for comments. If the implied option is module capable, user can still switch between Y and M, all without any feedback until she visits option's help. (try saying M to MAC80211 and then toggling CFG80211) This patch changes notation of selected-by-another items by introducing 2 new representations for implied options: {*} or {M} for options selected by another modularized one, thus builtin or module capable, -*- or -M- for options that cannot be at the moment changed by user. The idea is to represent actual capability of the option by braces (dashes) around and to always report actual state by * or M inside. Signed-off-by: Matej Laitl <strohel@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/mconf.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 1935818040e2..47e226fdedd7 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
35"kernel parameters which are not really features, but must be\n" 35"kernel parameters which are not really features, but must be\n"
36"entered in as decimal or hexadecimal numbers or possibly text.\n" 36"entered in as decimal or hexadecimal numbers or possibly text.\n"
37"\n" 37"\n"
38"Menu items beginning with [*], <M> or [ ] represent features\n" 38"Menu items beginning with following braces represent features that\n"
39"configured to be built in, modularized or removed respectively.\n" 39" [ ] can be built in or removed\n"
40"Pointed brackets <> represent module capable features.\n" 40" < > can be built in, modularized or removed\n"
41" { } can be built in or modularized (selected by other feature)\n"
42" - - are selected by other feature,\n"
43"while *, M or whitespace inside braces means to build in, build as\n"
44"a module or to exclude the feature respectively.\n"
41"\n" 45"\n"
42"To change any of these features, highlight it with the cursor\n" 46"To change any of these features, highlight it with the cursor\n"
43"keys and press <Y> to build it in, <M> to make it a module or\n" 47"keys and press <Y> to build it in, <M> to make it a module or\n"
@@ -569,7 +573,7 @@ static void build_conf(struct menu *menu)
569 if (sym_is_changable(sym)) 573 if (sym_is_changable(sym))
570 item_make("[%c]", val == no ? ' ' : '*'); 574 item_make("[%c]", val == no ? ' ' : '*');
571 else 575 else
572 item_make("---"); 576 item_make("-%c-", val == no ? ' ' : '*');
573 item_set_tag('t'); 577 item_set_tag('t');
574 item_set_data(menu); 578 item_set_data(menu);
575 break; 579 break;
@@ -579,10 +583,13 @@ static void build_conf(struct menu *menu)
579 case mod: ch = 'M'; break; 583 case mod: ch = 'M'; break;
580 default: ch = ' '; break; 584 default: ch = ' '; break;
581 } 585 }
582 if (sym_is_changable(sym)) 586 if (sym_is_changable(sym)) {
583 item_make("<%c>", ch); 587 if (sym->rev_dep.tri == mod)
584 else 588 item_make("{%c}", ch);
585 item_make("---"); 589 else
590 item_make("<%c>", ch);
591 } else
592 item_make("-%c-", ch);
586 item_set_tag('t'); 593 item_set_tag('t');
587 item_set_data(menu); 594 item_set_data(menu);
588 break; 595 break;