summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-internal.h')
-rw-r--r--src/libsystemd-bus/bus-internal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-internal.h b/src/libsystemd-bus/bus-internal.h
index 0edb09764a..5ba32ad8fd 100644
--- a/src/libsystemd-bus/bus-internal.h
+++ b/src/libsystemd-bus/bus-internal.h
@@ -68,9 +68,14 @@ enum bus_state {
BUS_OPENING,
BUS_AUTHENTICATING,
BUS_HELLO,
- BUS_RUNNING
+ BUS_RUNNING,
+ BUS_CLOSED
};
+static inline bool BUS_IS_OPEN(enum bus_state state) {
+ return state > BUS_UNSET && state < BUS_CLOSED;
+}
+
enum bus_auth {
_BUS_AUTH_INVALID,
BUS_AUTH_EXTERNAL,