Peter Kjellerstedt at axis.com writes:
Hello,
the attached patch should bring extra/config in line
with the Linux 2.6.7 sources.
The following are the commit messages for the respective
files from the Linux bk-repository:
checklist.c:
* fix menuconfig choice item help display
confdata.c:
* config: choice fix
* kconfig: don't rename target dir when saving config
expr.c, expr.h:
* config: disable debug prints
mconf.c:
* fix menuconfig choice item help display
menu.c:
* Kconfig: use select statements
symbol.c:
* config: choice fix
* Avoid bogus warning about recursive dependencies
* c99 struct initialiser conversions
textbox.c:
* janitor: don't init statics to 0
util.c:
* fix lxdialog behaviour
//Peter
diff --git a/scripts/config/symbol.c b/scripts/config/symbol.c
index 29d8d3e..a9fae9c 100644
--- a/scripts/config/symbol.c
+++ b/scripts/config/symbol.c
@@ -12,25 +12,26 @@
#include "lkc.h"
struct symbol symbol_yes = {
- name: "y",
- curr: { "y", yes },
- flags: SYMBOL_YES|SYMBOL_VALID,
+ .name = "y",
+ .curr = { "y", yes },
+ .flags = SYMBOL_YES|SYMBOL_VALID,
}, symbol_mod = {
- name: "m",
- curr: { "m", mod },
- flags: SYMBOL_MOD|SYMBOL_VALID,
+ .name = "m",
+ .curr = { "m", mod },
+ .flags = SYMBOL_MOD|SYMBOL_VALID,
}, symbol_no = {
- name: "n",
- curr: { "n", no },
- flags: SYMBOL_NO|SYMBOL_VALID,
+ .name = "n",
+ .curr = { "n", no },
+ .flags = SYMBOL_NO|SYMBOL_VALID,
}, symbol_empty = {
- name: "",
- curr: { "", no },
- flags: SYMBOL_VALID,
+ .name = "",
+ .curr = { "", no },
+ .flags = SYMBOL_VALID,
};
int sym_change_count;
struct symbol *modules_sym;
+tristate modules_val;
void sym_add_default(struct symbol *sym, const char *def)
{
@@ -72,11 +73,8 @@
if (type == S_TRISTATE) {
if (sym_is_choice_value(sym) && sym->visible == yes)
type = S_BOOLEAN;
- else {
- sym_calc_value(modules_sym);
- if (modules_sym->curr.tri == no)
- type = S_BOOLEAN;
- }
+ else if (modules_val == no)
+ type = S_BOOLEAN;
}
return type;
}
@@ -146,6 +144,8 @@
prop->visible.tri = expr_calc_value(prop->visible.expr);
tri = E_OR(tri, prop->visible.tri);
}
+ if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))
+ tri = yes;
if (sym->visible != tri) {
sym->visible = tri;
sym_set_changed(sym);
@@ -155,6 +155,8 @@
tri = no;
if (sym->rev_dep.expr)
tri = expr_calc_value(sym->rev_dep.expr);
+ if (tri == mod && sym_get_type(sym) == S_BOOLEAN)
+ tri = yes;
if (sym->rev_dep.tri != tri) {
sym->rev_dep.tri = tri;
sym_set_changed(sym);
@@ -261,14 +263,8 @@
newval.tri = expr_calc_value(prop->expr);
}
}
- if (sym_get_type(sym) == S_BOOLEAN) {
- if (newval.tri == mod)
- newval.tri = yes;
- if (sym->visible == mod)
- sym->visible = yes;
- if (sym->rev_dep.tri == mod)
- sym->rev_dep.tri = yes;
- }
+ if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
+ newval.tri = yes;
break;
case S_STRING:
case S_HEX:
@@ -300,6 +296,8 @@
if (memcmp(&oldval, &sym->curr, sizeof(oldval)))
sym_set_changed(sym);
+ if (modules_sym == sym)
+ modules_val = modules_sym->curr.tri;
if (sym_is_choice(sym)) {
int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
@@ -320,6 +318,8 @@
for_all_symbols(i, sym)
sym->flags &= ~SYMBOL_VALID;
sym_change_count++;
+ if (modules_sym)
+ sym_calc_value(modules_sym);
}
void sym_set_changed(struct symbol *sym)
@@ -699,7 +699,7 @@
goto out;
for (prop = sym->prop; prop; prop = prop->next) {
- if (prop->type == P_CHOICE)
+ if (prop->type == P_CHOICE || prop->type == P_SELECT)
continue;
sym2 = sym_check_expr_deps(prop->visible.expr);
if (sym2)