From 27987fddb7ded0cc808ec367d75fdfdd65242d51 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 6 Feb 2018 06:16:46 +0100 Subject: Refactor do_oldconfig() slightly Not sure why anyone would want to oldconfig just a part of the configuration tree, especially as there might be dependencies pointing outside of it. Take a Kconfig object instead of a node. --- examples/oldconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/oldconfig.py b/examples/oldconfig.py index d4eec97..37533e7 100644 --- a/examples/oldconfig.py +++ b/examples/oldconfig.py @@ -269,7 +269,7 @@ def do_oldconfig_for_node(node): options[sel_index - 1].set_value(2) return -def do_oldconfig(node): +def do_oldconfig(kconf): # An earlier symbol in the Kconfig files might depend on a later symbol and # become visible if its value changes. This flag is set to True if the # value of any symbol changes, in which case we rerun the oldconfig to @@ -278,7 +278,7 @@ def do_oldconfig(node): while True: conf_changed = False - do_oldconfig_rec(node) + do_oldconfig_rec(kconf.top_node) if not conf_changed: break @@ -303,7 +303,7 @@ if __name__ == "__main__": kconf = Kconfig(sys.argv[1]) kconf.load_config(".config") - do_oldconfig(kconf.top_node) + do_oldconfig(kconf) kconf.write_config(".config") print("Configuration written to .config") -- cgit v1.2.3