diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-06 06:16:46 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-06 06:20:13 +0100 |
| commit | 27987fddb7ded0cc808ec367d75fdfdd65242d51 (patch) | |
| tree | aa9a9d1ef475899430238716962663cbe4356855 /examples | |
| parent | 17d7568c6da9452ee0612e29edceee70017585d1 (diff) | |
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.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/oldconfig.py | 6 |
1 files changed, 3 insertions, 3 deletions
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") |
