From 16235f049fb67ba1756aeaab04eff1f1b5b1cf97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 24 Jul 2016 14:12:58 -0400 Subject: [PATCH] Add enable_disable() helper In this patch "enabled" and "disabled" is used exclusively, but "enable" and "disable" forms are need for the following patch. --- src/basic/util.h | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.30.2