From a23725c2fa2b95dc0b8af0e9570b3a88787fbfd6 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 19 Jun 2022 22:38:23 +0300 Subject: [PATCH] Move the add_cmdline_checks() call earlier populate_with_data() must be called after all checks have been added. --- kconfig_hardened_check/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index d1c77d0..2938c98 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -864,6 +864,10 @@ def main(): # add relevant kconfig checks to the checklist add_kconfig_checks(config_checklist, arch) + if args.cmdline: + # add relevant cmdline checks to the checklist + add_cmdline_checks(config_checklist, arch) + # populate the checklist with the parsed kconfig data parsed_kconfig_options = OrderedDict() parse_kconfig_file(parsed_kconfig_options, args.config) @@ -871,9 +875,6 @@ def main(): populate_with_data(config_checklist, kernel_version, 'version') if args.cmdline: - # add relevant cmdline checks to the checklist - add_cmdline_checks(config_checklist, arch) - # populate the checklist with the parsed kconfig data parsed_cmdline_options = OrderedDict() parse_cmdline_file(parsed_cmdline_options, args.cmdline) -- 2.31.1