From 92270e09d9338c34a28dc0e5b66af7be0ea07910 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 7 Mar 2020 23:39:23 +0300 Subject: [PATCH] Improve 'dunno' report in debug_mode --- kconfig-hardened-check.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index e2d8483..79206d2 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -545,7 +545,14 @@ def check_config_file(checklist, fname): perform_checks(checklist, parsed_options) if debug_mode: - known_options = [opt.name for opt in checklist] + known_options = [] + for opt in checklist: + if hasattr(opt, 'opts'): + for o in opt.opts: + if hasattr(o, 'name'): + known_options.append(o.name) + else: + known_options.append(opt.name) for option, value in parsed_options.items(): if option not in known_options: print('DEBUG: dunno about option {} ({})'.format(option, value)) -- 2.31.1