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:
92abe5f
)
Report that --print and --generate can't be used together
author
Alexander Popov
<alex.popov@linux.com>
Sun, 13 Aug 2023 16:49:08 +0000
(19:49 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Sun, 13 Aug 2023 16:49:08 +0000
(19:49 +0300)
kconfig_hardened_check/__init__.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/__init__.py
b/kconfig_hardened_check/__init__.py
index 7b4993faea3a7f246498c2b0792d8fc28cf2e630..0502785b893b321796c6034720dad33df3b7d827 100644
(file)
--- a/
kconfig_hardened_check/__init__.py
+++ b/
kconfig_hardened_check/__init__.py
@@
-348,6
+348,8
@@
def main():
if args.print:
assert(args.config is None and args.cmdline is None and args.sysctl is None), 'unexpected args'
if args.print:
assert(args.config is None and args.cmdline is None and args.sysctl is None), 'unexpected args'
+ if args.generate:
+ sys.exit('[!] ERROR: --print and --generate can\'t be used together')
if mode and mode not in ('verbose', 'json'):
sys.exit(f'[!] ERROR: wrong mode "{mode}" for --print')
arch = args.print
if mode and mode not in ('verbose', 'json'):
sys.exit(f'[!] ERROR: wrong mode "{mode}" for --print')
arch = args.print
@@
-360,7
+362,7
@@
def main():
sys.exit(0)
if args.generate:
sys.exit(0)
if args.generate:
- assert(args.config is None and args.cmdline is None and args.sysctl is None), 'unexpected args'
+ assert(args.config is None and args.cmdline is None and args.sysctl is None
and args.print is None
), 'unexpected args'
if mode:
sys.exit(f'[!] ERROR: wrong mode "{mode}" for --generate')
arch = args.generate
if mode:
sys.exit(f'[!] ERROR: wrong mode "{mode}" for --generate')
arch = args.generate