diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-09 15:42:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-09 19:43:43 +0200 |
commit | af41e5086d5ef78b033f639c63f957995eed9370 (patch) | |
tree | 40c1da700d0f8385450688c6340dd44ae4b2ed6a /src/core/emergency-action.c | |
parent | 899987456c8a14865f29cb7c62d95eb34f9736cc (diff) | |
download | systemd-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/emergency-action.c')
-rw-r--r-- | src/core/emergency-action.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/emergency-action.c b/src/core/emergency-action.c index 5420db8a87..6f0b0a8f33 100644 --- a/src/core/emergency-action.c +++ b/src/core/emergency-action.c @@ -41,7 +41,7 @@ int emergency_action( * in user mode */ log_warning("Exiting: %s", reason); - m->exit_code = MANAGER_EXIT; + m->objective = MANAGER_EXIT; return -ECANCELED; } @@ -59,7 +59,7 @@ int emergency_action( log_and_status(m, "Forcibly rebooting", reason); (void) update_reboot_parameter_and_warn(reboot_arg); - m->exit_code = MANAGER_REBOOT; + m->objective = MANAGER_REBOOT; break; @@ -85,7 +85,7 @@ int emergency_action( case EMERGENCY_ACTION_POWEROFF_FORCE: log_and_status(m, "Forcibly powering off", reason); - m->exit_code = MANAGER_POWEROFF; + m->objective = MANAGER_POWEROFF; break; case EMERGENCY_ACTION_POWEROFF_IMMEDIATE: |