chiark / gitweb /
unit: add new abstracted maintenance state for units
[elogind.git] / src / unit.h
index 70b3c9a4c104985896bc5358c4b6124ea940b7f5..03031892d0f33f8b5477218d01db5a18a356603e 100644 (file)
@@ -80,6 +80,7 @@ enum UnitActiveState {
         UNIT_ACTIVE,
         UNIT_ACTIVE_RELOADING,
         UNIT_INACTIVE,
+        UNIT_INACTIVE_MAINTENANCE,
         UNIT_ACTIVATING,
         UNIT_DEACTIVATING,
         _UNIT_ACTIVE_STATE_MAX,
@@ -95,7 +96,11 @@ static inline bool UNIT_IS_ACTIVE_OR_ACTIVATING(UnitActiveState t) {
 }
 
 static inline bool UNIT_IS_INACTIVE_OR_DEACTIVATING(UnitActiveState t) {
-        return t == UNIT_INACTIVE || t == UNIT_DEACTIVATING;
+        return t == UNIT_INACTIVE || t == UNIT_INACTIVE_MAINTENANCE || t == UNIT_DEACTIVATING;
+}
+
+static inline bool UNIT_IS_INACTIVE_OR_MAINTENANCE(UnitActiveState t) {
+        return t == UNIT_INACTIVE || t == UNIT_INACTIVE_MAINTENANCE;
 }
 
 enum UnitDependency {