From 873c7efe496cfd2398b750a616781a5234ae3c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 4 May 2015 21:57:57 +0200 Subject: parse_kconfig fix problem with generated rules Generated rules were unsatisfiable all the time. Problem was default value of vis variable. --- scripts/parse_kconfig/parse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/parse_kconfig') diff --git a/scripts/parse_kconfig/parse.c b/scripts/parse_kconfig/parse.c index b7ab951..f8a2401 100644 --- a/scripts/parse_kconfig/parse.c +++ b/scripts/parse_kconfig/parse.c @@ -105,12 +105,15 @@ void cpy_dep() { if (prop->visible.expr != NULL) { doutput_expr(prop->visible.expr); struct boolexpr *vis = - boolexpr_kconfig(gsymlist, prop->visible.expr, false); + boolexpr_kconfig(gsymlist, prop->visible.expr, + false); if (el->vis == NULL) { el->vis = vis; } else { el->vis = boolexpr_or(el->vis, vis); } + } else if (el->vis == NULL) { + el->vis = boolexpr_true(); } } if (el->vis == NULL) @@ -234,8 +237,8 @@ void cpy_dep() { w4 = boolexpr_or(w4, el->vis); pw = boolexpr_and(w1, w2); - pw = boolexpr_and(pw, w3); - pw = boolexpr_and(pw, w4); + pw = boolexpr_and(w3, pw); + pw = boolexpr_and(w4, pw); Dprintf(" CNF:\n"); doutput_boolexpr(pw, gsymlist); cnf_boolexpr(gsymlist, pw); -- cgit v1.2.3