projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc68441
)
Show error if some cmdline option exists multiple times
author
Alexander Popov
<alex.popov@linux.com>
Wed, 12 Jul 2023 08:11:27 +0000
(11:11 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Wed, 12 Jul 2023 08:11:27 +0000
(11:11 +0300)
kconfig_hardened_check/__init__.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/__init__.py
b/kconfig_hardened_check/__init__.py
index a423358b932d8dd3cb82a6e5c9c64259d856e3b7..572ed0ab6f7467e42bfa50256b0fe9d8cd4f4889 100644
(file)
--- a/
kconfig_hardened_check/__init__.py
+++ b/
kconfig_hardened_check/__init__.py
@@
-193,6
+193,8
@@
def parse_cmdline_file(parsed_options, fname):
else:
name = opt
value = '' # '' is not None
+ if name in parsed_options:
+ sys.exit(f'[!] ERROR: cmdline option "{name}" exists multiple times')
value = normalize_cmdline_options(name, value)
parsed_options[name] = value