lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240905092540.2962122-1-lihongbo22@huawei.com>
Date: Thu, 5 Sep 2024 17:25:38 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: <kees@...nel.org>, <andy@...nel.org>
CC: <linux-hardening@...r.kernel.org>, <lihongbo22@...wei.com>,
	<chris.zjh@...wei.com>
Subject: [PATCH -next v2 0/2] 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.

Changes in v2:
  - Remove the use cases and only keep the added helpers.
  - Add comments to explaing the use of string choices' helpers
    as suggested by Andy.

v1: https://lore.kernel.org/netdev/20240831095840.4173362-1-lihongbo22@huawei.com/

Hongbo Li (2):
  lib/string_choices: Introduce several opposite string choice helpers
  lib/string_choices: Add some comments to make more clear for string
    choices helpers.

 include/linux/string_choices.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ