This little patch changes notation of unchangeable menuconfig items to always
reflect the current state of inclusion of a feature.
Signed-off-by: Matěj Laitl <[email protected]>
---
Hi again, Sam, Roman, Randy.
Instead of incorporating all changes into a single patch, I decided to split
things into more rather independent patches.
Expect another one extending show_help(). (which ATM needs more polishing
before being posted)
scripts/kconfig/mconf.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..38ffbe1 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -542,14 +542,19 @@ static void build_conf(struct menu *menu)
return;
}
} else {
+ val = sym_get_tristate_value(sym);
+ switch (val) {
+ case yes: ch = '*'; break;
+ case mod: ch = 'M'; break;
+ default: ch = ' '; break;
+ }
if (menu == current_menu) {
- item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+ item_make("-%c-%*c%s", ch, indent + 1, ' ', menu_get_prompt(menu));
item_set_tag(':');
item_set_data(menu);
goto conf_childs;
}
child_count++;
- val = sym_get_tristate_value(sym);
if (sym_is_choice_value(sym) && val == yes) {
item_make(" ");
item_set_tag(':');
@@ -558,22 +563,17 @@ static void build_conf(struct menu *menu)
switch (type) {
case S_BOOLEAN:
if (sym_is_changable(sym))
- item_make("[%c]", val == no ? ' ' : '*');
+ item_make("[%c]", ch);
else
- item_make("---");
+ item_make("-%c-", ch);
item_set_tag('t');
item_set_data(menu);
break;
case S_TRISTATE:
- switch (val) {
- case yes: ch = '*'; break;
- case mod: ch = 'M'; break;
- default: ch = ' '; break;
- }
if (sym_is_changable(sym))
item_make("<%c>", ch);
else
- item_make("---");
+ item_make("-%c-", ch);
item_set_tag('t');
item_set_data(menu);
break;
--
1.5.1.6
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]