mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
string-util: add on_off
This commit is contained in:
parent
e8ac916ec3
commit
35dab95cdd
|
@ -74,6 +74,10 @@ static inline const sd_char *yes_no(bool b) {
|
|||
return b ? STR_C("yes") : STR_C("no");
|
||||
}
|
||||
|
||||
static inline const sd_char *on_off(bool b) {
|
||||
return b ? STR_C("on") : STR_C("off");
|
||||
}
|
||||
|
||||
static inline const sd_char* comparison_operator(int result) {
|
||||
return result < 0 ? STR_C("<") : result > 0 ? STR_C(">") : STR_C("==");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue