summaryrefslogtreecommitdiff
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-09 15:42:19 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-09 19:43:43 +0200
commitaf41e5086d5ef78b033f639c63f957995eed9370 (patch)
tree40c1da700d0f8385450688c6340dd44ae4b2ed6a /src/core/manager.h
parent899987456c8a14865f29cb7c62d95eb34f9736cc (diff)
downloadsystemd-af41e5086d5ef78b033f639c63f957995eed9370.tar.gz
core: rename ManagerExitCode → ManagerObjective
"ExitCode" is a bit of a misnomer in two ways: it suggests this was about the "exit code" concept that exit()/waitid() deal with, but really isn't. Moreover, it's not event just about exiting either, but more often about reloading/reexecing or rebooting. Let's hence pick a new name for this that is a bit more correct. I initially thought about naming this the "state", but that'd be a misnomer too, as the value really encodes a "goal" more than a current state. Also we already have the externally visible ManagerState. No actual changes in behaviour, just the rename.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 81ff52aa4b..a26ffda3a5 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -36,7 +36,7 @@ typedef enum ManagerState {
_MANAGER_STATE_INVALID = -1
} ManagerState;
-typedef enum ManagerExitCode {
+typedef enum ManagerObjective {
MANAGER_OK,
MANAGER_EXIT,
MANAGER_RELOAD,
@@ -46,9 +46,9 @@ typedef enum ManagerExitCode {
MANAGER_HALT,
MANAGER_KEXEC,
MANAGER_SWITCH_ROOT,
- _MANAGER_EXIT_CODE_MAX,
- _MANAGER_EXIT_CODE_INVALID = -1
-} ManagerExitCode;
+ _MANAGER_OBJECTIVE_MAX,
+ _MANAGER_OBJECTIVE_INVALID = -1
+} ManagerObjective;
typedef enum StatusType {
STATUS_TYPE_EPHEMERAL,
@@ -282,9 +282,9 @@ struct Manager {
usec_t etc_localtime_mtime;
bool etc_localtime_accessible:1;
- /* Flags */
- ManagerExitCode exit_code:5;
+ ManagerObjective objective:5;
+ /* Flags */
bool dispatching_load_queue:1;
bool dispatching_dbus_queue:1;
@@ -407,8 +407,8 @@ struct Manager {
#define MANAGER_IS_FINISHED(m) (dual_timestamp_is_set((m)->timestamps + MANAGER_TIMESTAMP_FINISH))
-/* The exit code is set to OK as soon as we enter the main loop, and set otherwise as soon as we are done with it */
-#define MANAGER_IS_RUNNING(m) ((m)->exit_code == MANAGER_OK)
+/* The objective is set to OK as soon as we enter the main loop, and set otherwise as soon as we are done with it */
+#define MANAGER_IS_RUNNING(m) ((m)->objective == MANAGER_OK)
int manager_new(UnitFileScope scope, unsigned test_run_flags, Manager **m);
Manager* manager_free(Manager *m);