chiark / gitweb /
bus: keep kernel bus fd around during entire life-time of bus
[elogind.git] / src / libsystemd-bus / bus-internal.h
index 0edb09764af2800263a51367adb7c3046dd1bc47..5ba32ad8fd7c6e40e7c859cd0b8854caee1a50d6 100644 (file)
@@ -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,