Loading...
Searching...
No Matches
Go to the documentation of this file.
2#ifndef _LINUX_STRING_CHOICES_H_
3#define _LINUX_STRING_CHOICES_H_
20static inline const char *str_assert_deassert(
bool v)
22 return v ?
"assert" :
"deassert";
24#define str_deassert_assert(v) str_assert_deassert(!(v))
26static inline const char *str_enable_disable(
bool v)
28 return v ?
"enable" :
"disable";
30#define str_disable_enable(v) str_enable_disable(!(v))
32static inline const char *str_enabled_disabled(
bool v)
34 return v ?
"enabled" :
"disabled";
36#define str_disabled_enabled(v) str_enabled_disabled(!(v))
38static inline const char *str_hi_lo(
bool v)
40 return v ?
"hi" :
"lo";
42#define str_lo_hi(v) str_hi_lo(!(v))
44static inline const char *str_high_low(
bool v)
46 return v ?
"high" :
"low";
48#define str_low_high(v) str_high_low(!(v))
50static inline const char *str_input_output(
bool v)
52 return v ?
"input" :
"output";
54#define str_output_input(v) str_input_output(!(v))
56static inline const char *str_on_off(
bool v)
58 return v ?
"on" :
"off";
60#define str_off_on(v) str_on_off(!(v))
62static inline const char *str_read_write(
bool v)
64 return v ?
"read" :
"write";
66#define str_write_read(v) str_read_write(!(v))
68static inline const char *str_true_false(
bool v)
70 return v ?
"true" :
"false";
72#define str_false_true(v) str_true_false(!(v))
74static inline const char *str_up_down(
bool v)
76 return v ?
"up" :
"down";
78#define str_down_up(v) str_up_down(!(v))
80static inline const char *str_yes_no(
bool v)
82 return v ?
"yes" :
"no";
84#define str_no_yes(v) str_yes_no(!(v))
92static inline const char *str_plural(
size_t num)
94 return num == 1 ?
"" :
"s";