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:
3438180
)
Improve normalize_cmdline_options()
author
Alexander Popov
<alex.popov@linux.com>
Sat, 17 Jun 2023 15:58:05 +0000
(18:58 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Sat, 17 Jun 2023 15:58:05 +0000
(18:58 +0300)
kconfig_hardened_check/checks.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/checks.py
b/kconfig_hardened_check/checks.py
index 9052aaa4f1fa03a616d4360f3dec6c898acec3e2..31a5b12b8425a44fae29a43a33f741734d621cef 100644
(file)
--- a/
kconfig_hardened_check/checks.py
+++ b/
kconfig_hardened_check/checks.py
@@
-604,9
+604,9
@@
def normalize_cmdline_options(option, value):
return value
# Implement a limited part of the kstrtobool() logic
- if value
in ('1', 'on', 'On', 'ON', 'y', 'Y', 'yes', 'Yes', 'YES
'):
+ if value
.lower() in ('1', 'on', 'y', 'yes', 't', 'true
'):
return '1'
- if value
in ('0', 'off', 'Off', 'OFF', 'n', 'N', 'no', 'No', 'NO
'):
+ if value
.lower() in ('0', 'off', 'n', 'no', 'f', 'false
'):
return '0'
# Preserve unique values