diff options
author | Matthew Miller <mattdm@mattdm.org> | 2010-08-31 00:23:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-31 00:23:34 +0200 |
commit | fdf20a316035779bbec469e11d73c7544acbf30f (patch) | |
tree | c99f2d7a60e5816ff554c48bcfbe497d0c22a30d /src/swap.c | |
parent | 74ac3cbd509de2f5995542aa5db39328e8cbd22a (diff) |
manager: add missing second part of s/maintenance/failed/
Diffstat (limited to 'src/swap.c')
-rw-r--r-- | src/swap.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/swap.c b/src/swap.c index 0beb9212ea..776b707d3a 100644 --- a/src/swap.c +++ b/src/swap.c @@ -38,7 +38,7 @@ static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = { [SWAP_DEAD] = UNIT_INACTIVE, [SWAP_ACTIVE] = UNIT_ACTIVE, - [SWAP_MAINTENANCE] = UNIT_MAINTENANCE + [SWAP_FAILED] = UNIT_FAILED }; static void swap_init(Unit *u) { @@ -428,7 +428,7 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { static void swap_enter_dead(Swap *s, bool success) { assert(s); - swap_set_state(s, success ? SWAP_DEAD : SWAP_MAINTENANCE); + swap_set_state(s, success ? SWAP_DEAD : SWAP_FAILED); } static int swap_start(Unit *u) { @@ -437,7 +437,7 @@ static int swap_start(Unit *u) { int r; assert(s); - assert(s->state == SWAP_DEAD || s->state == SWAP_MAINTENANCE); + assert(s->state == SWAP_DEAD || s->state == SWAP_FAILED); if (s->from_fragment) priority = s->parameters_fragment.priority; @@ -584,19 +584,19 @@ static int swap_enumerate(Manager *m) { return r; } -static void swap_reset_maintenance(Unit *u) { +static void swap_reset_failed(Unit *u) { Swap *s = SWAP(u); assert(s); - if (s->state == SWAP_MAINTENANCE) + if (s->state == SWAP_FAILED) swap_set_state(s, SWAP_DEAD); } static const char* const swap_state_table[_SWAP_STATE_MAX] = { [SWAP_DEAD] = "dead", [SWAP_ACTIVE] = "active", - [SWAP_MAINTENANCE] = "maintenance" + [SWAP_FAILED] = "failed" }; DEFINE_STRING_TABLE_LOOKUP(swap_state, SwapState); @@ -631,7 +631,7 @@ const UnitVTable swap_vtable = { .bus_message_handler = bus_swap_message_handler, .bus_invalidating_properties = bus_swap_invalidating_properties, - .reset_maintenance = swap_reset_maintenance, + .reset_failed = swap_reset_failed, .enumerate = swap_enumerate, .shutdown = swap_shutdown |