summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/expr.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2008-01-24 11:54:23 +0000
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 23:21:18 +0100
commitf5eaa323eb6819d2f737ead42464efccaf2b98b9 (patch)
tree2ea709d5fd82bff86103607d285106f5bb71f64f /scripts/kconfig/expr.c
parent1a3fb6d481689d0482eacadcbe3205b49b423c11 (diff)
downloadop-kernel-dev-f5eaa323eb6819d2f737ead42464efccaf2b98b9.zip
op-kernel-dev-f5eaa323eb6819d2f737ead42464efccaf2b98b9.tar.gz
kconfig: tristate choices with mixed tristate and boolean values
Change kconfig behavior so that mixing bool and tristate config settings in a choice is possible and has the desired effect of offering just the tristate options individually if the choice gets set to M, and a normal boolean selection if the choice gets set to Y. Also fix scripts/kconfig/conf's handling of children of choice values - there may be more than one immediate child, and all of them need to be processed. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: "Roman Zippel" <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/expr.c')
-rw-r--r--scripts/kconfig/expr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 13788ada..579ece4 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -1034,12 +1034,18 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *
expr_print(e->left.expr, fn, data, E_NOT);
break;
case E_EQUAL:
- fn(data, e->left.sym, e->left.sym->name);
+ if (e->left.sym->name)
+ fn(data, e->left.sym, e->left.sym->name);
+ else
+ fn(data, NULL, "<choice>");
fn(data, NULL, "=");
fn(data, e->right.sym, e->right.sym->name);
break;
case E_UNEQUAL:
- fn(data, e->left.sym, e->left.sym->name);
+ if (e->left.sym->name)
+ fn(data, e->left.sym, e->left.sym->name);
+ else
+ fn(data, NULL, "<choice>");
fn(data, NULL, "!=");
fn(data, e->right.sym, e->right.sym->name);
break;
OpenPOWER on IntegriCloud