History

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.

Matej Laitl committed 19 years ago

Commit b5d609d1 parent a5bf3d81 file · +15 −8Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kconfig/mconf.c+15−8
@@ -35,9 +35,13 @@ static const char mconf_readme[] = N_( · 34 unmodified lines
3535 "kernel parameters which are not really features, but must be\n"
3636 "entered in as decimal or hexadecimal numbers or possibly text.\n"
3737 "\n"
38−"Menu items beginning with [*], <M> or [ ] represent features\n"
39−"configured to be built in, modularized or removed respectively.\n"
40−"Pointed brackets <> represent module capable features.\n"
38+"Menu items beginning with following braces represent features that\n"
39+" [ ] can be built in or removed\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"
4145 "\n"
4246 "To change any of these features, highlight it with the cursor\n"
4347 "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) · 525 unmodified lines
569573 if (sym_is_changable(sym))
570574 item_make("[%c]", val == no ? ' ' : '*');
571575 else
572− item_make("---");
576+ item_make("-%c-", val == no ? ' ' : '*');
573577 item_set_tag('t');
574578 item_set_data(menu);
575579 break;
@@ -579,10 +583,13 @@ static void build_conf(struct menu *menu) · 3 unmodified lines
579583 case mod: ch = 'M'; break;
580584 default: ch = ' '; break;
581585 }
582− if (sym_is_changable(sym))
583− item_make("<%c>", ch);
584− else
585− item_make("---");
586+ if (sym_is_changable(sym)) {
587+ if (sym->rev_dep.tri == mod)
588+ item_make("{%c}", ch);
589+ else
590+ item_make("<%c>", ch);
591+ } else
592+ item_make("-%c-", ch);
586593 item_set_tag('t');
587594 item_set_data(menu);
588595 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t