From: Zbigniew Jędrzejewski-Szmek Date: Sun, 24 Jul 2016 18:12:58 +0000 (-0400) Subject: Add enable_disable() helper X-Git-Tag: v232.2~111 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=16235f049fb67ba1756aeaab04eff1f1b5b1cf97 Add enable_disable() helper In this patch "enabled" and "disabled" is used exclusively, but "enable" and "disable" forms are need for the following patch. --- diff --git a/src/basic/util.h b/src/basic/util.h index 346221ca0..75631c436 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -61,6 +61,10 @@ static inline const char* one_zero(bool b) { return b ? "1" : "0"; } +static inline const char* enable_disable(bool b) { + return b ? "enable" : "disable"; +} + void execute_directories(const char* const* directories, usec_t timeout, char *argv[]); #if 0 /// UNNEEDED by elogind