Merge pull request #15594 from leandrolanzieri/pr/tools/kconfig_fix_range_cond_print
dist/tools/kconfig/genconfig: fix printing of range condition
This commit is contained in:
commit
57de2c0cea
6
dist/tools/kconfiglib/genconfig.py
vendored
6
dist/tools/kconfiglib/genconfig.py
vendored
@ -293,8 +293,10 @@ def get_sym_applying_range(sym):
|
|||||||
(low, high, cond) = rng
|
(low, high, cond) = rng
|
||||||
# get the first active one
|
# get the first active one
|
||||||
if kconfiglib.expr_value(cond):
|
if kconfiglib.expr_value(cond):
|
||||||
return (low.str_value, high.str_value,
|
cond_str = ""
|
||||||
"(if {})".format(cond.name) if not cond.is_constant else "")
|
if cond is not sym.kconfig.y:
|
||||||
|
cond_str = "if {}".format(kconfiglib.expr_str(cond))
|
||||||
|
return (low.str_value, high.str_value, cond_str)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user