From 0b1c6d98f075dffcc4d1729e00e04b0854f378eb Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 17 Jun 2023 18:58:05 +0300 Subject: [PATCH] Improve normalize_cmdline_options() --- kconfig_hardened_check/checks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kconfig_hardened_check/checks.py b/kconfig_hardened_check/checks.py index 9052aaa..31a5b12 100644 --- 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 -- 2.31.1