Skip to content
Commit c2708ba9 authored by Hongbo Li's avatar Hongbo Li Committed by Kees Cook
Browse files

lib/string_choices: Introduce several opposite string choice helpers



Similar to the exists helper: str_enable_disable/
str_enabled_disabled/str_on_off/str_yes_no helpers, we can
add the opposite helpers. That's str_disable_enable,
str_disabled_enabled, str_off_on and str_no_yes.

There are more than 10 cases currently (expect
str_disable_enable now has 3 use cases) exist in the code
can be replaced with these helper.

Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
Acked-by: default avatarAndy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240905092540.2962122-2-lihongbo22@huawei.com


Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent 6ff4cd11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment