From f5eaa323eb6819d2f737ead42464efccaf2b98b9 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 24 Jan 2008 11:54:23 +0000 Subject: 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 Cc: "Roman Zippel" Signed-off-by: Sam Ravnborg --- scripts/kconfig/expr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts/kconfig/expr.c') diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 13788ada522..579ece4fa58 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, ""); 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, ""); fn(data, NULL, "!="); fn(data, e->right.sym, e->right.sym->name); break; -- cgit v1.2.3