1 /* Public domain. */
2 
3 #ifndef _LINUX_STRING_HELPERS_H
4 #define _LINUX_STRING_HELPERS_H
5 
6 #include <linux/types.h>
7 
8 static inline const char *
str_yes_no(bool x)9 str_yes_no(bool x)
10 {
11 	if (x)
12 		return "yes";
13 	return "no";
14 }
15 
16 static inline const char *
str_on_off(bool x)17 str_on_off(bool x)
18 {
19 	if (x)
20 		return "on";
21 	return "off";
22 }
23 
24 static inline const char *
str_enabled_disabled(bool x)25 str_enabled_disabled(bool x)
26 {
27 	if (x)
28 		return "enabled";
29 	return "disabled";
30 }
31 
32 static inline const char *
str_enable_disable(bool x)33 str_enable_disable(bool x)
34 {
35 	if (x)
36 		return "enable";
37 	return "disable";
38 }
39 
40 #endif
41