chiark / gitweb /
Add enable_disable() helper
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 24 Jul 2016 18:12:58 +0000 (14:12 -0400)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:49 +0000 (08:50 +0200)
In this patch "enabled" and "disabled" is used exclusively, but "enable" and
"disable" forms are need for the following patch.

src/basic/util.h

index 346221ca0c99682f055db0374d1215b05149dd41..75631c436bdc560edc0395246ada2f6814e96b33 100644 (file)
@@ -61,6 +61,10 @@ static inline const char* one_zero(bool b) {
         return b ? "1" : "0";
 }
 
         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
 void execute_directories(const char* const* directories, usec_t timeout, char *argv[]);
 
 #if 0 /// UNNEEDED by elogind