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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r03l6zeh.wl-kuninori.morimoto.gx@renesas.com>
Date: Wed, 26 Feb 2025 05:36:06 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Kees Cook <kees@...nel.org>, linux-hardening@...r.kernel.org
Subject: [PATCH 05/10] lib/string_choices: Add str_Y_N() helper

Add str_Y_N() helper to return "Y" or "N" string literal.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
---
 include/linux/string_choices.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h
index cc7c771f4e84..615ddbde4743 100644
--- a/include/linux/string_choices.h
+++ b/include/linux/string_choices.h
@@ -65,6 +65,12 @@ static inline const char *str_yes_no(bool v)
 }
 #define str_no_yes(v)		str_yes_no(!(v))
 
+static inline const char *str_Y_N(bool v)
+{
+	return v ? "Y" : "N";
+}
+#define str_N_Y(v)		str_Y_N(!(v))
+
 static inline const char *str_up_down(bool v)
 {
 	return v ? "up" : "down";
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ