summaryrefslogtreecommitdiff
path: root/src/unit.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/unit.c
parent2419cc5bdb66304adf7be4cf60af91979c5d24d9 (diff)
unit: shorten active state enums to make systemctl output nicer
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/unit.c b/src/unit.c
index 79b9e2bb8a..9fed5a0f4e 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -819,7 +819,7 @@ int unit_reload(Unit *u) {
return -EBADR;
state = unit_active_state(u);
- if (unit_active_state(u) == UNIT_ACTIVE_RELOADING)
+ if (unit_active_state(u) == UNIT_RELOADING)
return -EALREADY;
if (unit_active_state(u) != UNIT_ACTIVE)
@@ -998,7 +998,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
if (u->meta.job->state == JOB_RUNNING) {
if (ns == UNIT_ACTIVE)
job_finish_and_invalidate(u->meta.job, true);
- else if (ns != UNIT_ACTIVATING && ns != UNIT_ACTIVE_RELOADING) {
+ else if (ns != UNIT_ACTIVATING && ns != UNIT_RELOADING) {
unexpected = true;
job_finish_and_invalidate(u->meta.job, false);
}
@@ -1012,7 +1012,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
if (ns == UNIT_INACTIVE)
job_finish_and_invalidate(u->meta.job, true);
- else if (ns == UNIT_INACTIVE_MAINTENANCE)
+ else if (ns == UNIT_MAINTENANCE)
job_finish_and_invalidate(u->meta.job, false);
else if (u->meta.job->state == JOB_RUNNING && ns != UNIT_DEACTIVATING) {
unexpected = true;
@@ -1964,9 +1964,9 @@ DEFINE_STRING_TABLE_LOOKUP(unit_load_state, UnitLoadState);
static const char* const unit_active_state_table[_UNIT_ACTIVE_STATE_MAX] = {
[UNIT_ACTIVE] = "active",
- [UNIT_ACTIVE_RELOADING] = "active-reloading",
+ [UNIT_RELOADING] = "reloading",
[UNIT_INACTIVE] = "inactive",
- [UNIT_INACTIVE_MAINTENANCE] = "inactive-maintenance",
+ [UNIT_MAINTENANCE] = "maintenance",
[UNIT_ACTIVATING] = "activating",
[UNIT_DEACTIVATING] = "deactivating"
};