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