summaryrefslogtreecommitdiff
path: root/src/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-01 03:34:15 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-01 03:34:15 +0200
commit032ff4afc953cae076ce0ee6a0b85020eeb1a75a (patch)
treea02edabae64a7b9d52c33b6ee77f40e59ad0fb19 /src/job.c
parent2419cc5bdb66304adf7be4cf60af91979c5d24d9 (diff)
unit: shorten active state enums to make systemctl output nicer
Diffstat (limited to 'src/job.c')
-rw-r--r--src/job.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/job.c b/src/job.c
index 8273a39c35..31e9cfe8d6 100644
--- a/src/job.c
+++ b/src/job.c
@@ -275,26 +275,26 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) {
case JOB_START:
return
b == UNIT_ACTIVE ||
- b == UNIT_ACTIVE_RELOADING;
+ b == UNIT_RELOADING;
case JOB_STOP:
return
b == UNIT_INACTIVE ||
- b == UNIT_INACTIVE_MAINTENANCE;
+ b == UNIT_MAINTENANCE;
case JOB_VERIFY_ACTIVE:
return
b == UNIT_ACTIVE ||
- b == UNIT_ACTIVE_RELOADING;
+ b == UNIT_RELOADING;
case JOB_RELOAD:
return
- b == UNIT_ACTIVE_RELOADING;
+ b == UNIT_RELOADING;
case JOB_RELOAD_OR_START:
return
b == UNIT_ACTIVATING ||
- b == UNIT_ACTIVE_RELOADING;
+ b == UNIT_RELOADING;
case JOB_RESTART:
return
@@ -416,7 +416,7 @@ int job_run_and_invalidate(Job *j) {
case JOB_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
- if (t == UNIT_INACTIVE || t == UNIT_INACTIVE_MAINTENANCE || t == UNIT_ACTIVATING) {
+ if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_ACTIVATING) {
j->type = JOB_START;
r = unit_start(j->unit);
} else
@@ -426,7 +426,7 @@ int job_run_and_invalidate(Job *j) {
case JOB_TRY_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
- if (t == UNIT_INACTIVE || t == UNIT_INACTIVE_MAINTENANCE || t == UNIT_DEACTIVATING)
+ if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_DEACTIVATING)
r = -ENOEXEC;
else if (t == UNIT_ACTIVATING) {
j->type = JOB_START;