diff options
Diffstat (limited to 'src/core/manager.h')
-rw-r--r-- | src/core/manager.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/core/manager.h b/src/core/manager.h index e014abd04f..38f1c89c93 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -35,8 +35,18 @@ typedef struct Manager Manager; -typedef enum ManagerExitCode { +typedef enum ManagerState { + MANAGER_STARTING, MANAGER_RUNNING, + MANAGER_DEGRADED, + MANAGER_MAINTENANCE, + MANAGER_STOPPING, + _MANAGER_STATE_MAX, + _MANAGER_STATE_INVALID = -1 +} ManagerState; + +typedef enum ManagerExitCode { + MANAGER_OK, MANAGER_EXIT, MANAGER_RELOAD, MANAGER_REEXECUTE, @@ -106,6 +116,9 @@ struct Manager { Hashmap *watch_pids1; /* pid => Unit object n:1 */ Hashmap *watch_pids2; /* pid => Unit object n:1 */ + /* A set which contains all currently failed units */ + Set *failed_units; + sd_event_source *run_queue_event_source; char *notify_socket; @@ -321,3 +334,8 @@ void manager_flip_auto_status(Manager *m, bool enable); Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path); const char *manager_get_runtime_prefix(Manager *m); + +ManagerState manager_state(Manager *m); + +const char *manager_state_to_string(ManagerState m) _const_; +ManagerState manager_state_from_string(const char *s) _pure_; |