diff options
author | Jan Beulich <jbeulich@novell.com> | 2008-01-24 06:54:23 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-01-28 17:21:18 -0500 |
commit | f5eaa323eb6819d2f737ead42464efccaf2b98b9 (patch) | |
tree | 2ea709d5fd82bff86103607d285106f5bb71f64f /scripts/kconfig/expr.c | |
parent | 1a3fb6d481689d0482eacadcbe3205b49b423c11 (diff) |
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.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 * | |||
1034 | expr_print(e->left.expr, fn, data, E_NOT); | 1034 | expr_print(e->left.expr, fn, data, E_NOT); |
1035 | break; | 1035 | break; |
1036 | case E_EQUAL: | 1036 | case E_EQUAL: |
1037 | fn(data, e->left.sym, e->left.sym->name); | 1037 | if (e->left.sym->name) |
1038 | fn(data, e->left.sym, e->left.sym->name); | ||
1039 | else | ||
1040 | fn(data, NULL, "<choice>"); | ||
1038 | fn(data, NULL, "="); | 1041 | fn(data, NULL, "="); |
1039 | fn(data, e->right.sym, e->right.sym->name); | 1042 | fn(data, e->right.sym, e->right.sym->name); |
1040 | break; | 1043 | break; |
1041 | case E_UNEQUAL: | 1044 | case E_UNEQUAL: |
1042 | fn(data, e->left.sym, e->left.sym->name); | 1045 | if (e->left.sym->name) |
1046 | fn(data, e->left.sym, e->left.sym->name); | ||
1047 | else | ||
1048 | fn(data, NULL, "<choice>"); | ||
1043 | fn(data, NULL, "!="); | 1049 | fn(data, NULL, "!="); |
1044 | fn(data, e->right.sym, e->right.sym->name); | 1050 | fn(data, e->right.sym, e->right.sym->name); |
1045 | break; | 1051 | break; |