X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ftimer.c;h=ead8ab92a4b0881de1120cfe78b93775f6e44e00;hp=b025051f2b77a0d3000b45af545a9cd1a2542d3b;hb=4cd1fbcc0648a289e9bf9d9047621bbdf7ec0ece;hpb=01f78473b104d28db0fa813414092bc6358ae521 diff --git a/src/timer.c b/src/timer.c index b025051f2..ead8ab92a 100644 --- a/src/timer.c +++ b/src/timer.c @@ -31,7 +31,7 @@ static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = { [TIMER_WAITING] = UNIT_ACTIVE, [TIMER_RUNNING] = UNIT_ACTIVE, [TIMER_ELAPSED] = UNIT_ACTIVE, - [TIMER_MAINTAINANCE] = UNIT_INACTIVE + [TIMER_MAINTENANCE] = UNIT_INACTIVE }; static void timer_init(Unit *u) { @@ -60,7 +60,7 @@ static void timer_done(Unit *u) { static int timer_verify(Timer *t) { assert(t); - if (UNIT(t)->meta.load_state != UNIT_LOADED) + if (t->meta.load_state != UNIT_LOADED) return 0; if (!t->values) { @@ -167,7 +167,7 @@ static void timer_enter_dead(Timer *t, bool success) { if (!success) t->failure = true; - timer_set_state(t, t->failure ? TIMER_MAINTAINANCE : TIMER_DEAD); + timer_set_state(t, t->failure ? TIMER_MAINTENANCE : TIMER_DEAD); } static void timer_enter_waiting(Timer *t, bool initial) { @@ -258,7 +258,7 @@ static void timer_enter_running(Timer *t) { int r; assert(t); - if ((r = manager_add_job(UNIT(t)->meta.manager, JOB_START, t->unit, JOB_REPLACE, true, NULL)) < 0) + if ((r = manager_add_job(t->meta.manager, JOB_START, t->unit, JOB_REPLACE, true, NULL)) < 0) goto fail; timer_set_state(t, TIMER_RUNNING); @@ -273,7 +273,7 @@ static int timer_start(Unit *u) { Timer *t = TIMER(u); assert(t); - assert(t->state == TIMER_DEAD || t->state == TIMER_MAINTAINANCE); + assert(t->state == TIMER_DEAD || t->state == TIMER_MAINTENANCE); if (t->unit->meta.load_state != UNIT_LOADED) return -ENOENT; @@ -409,7 +409,7 @@ void timer_unit_notify(Unit *u, UnitActiveState new_state) { break; case TIMER_DEAD: - case TIMER_MAINTAINANCE: + case TIMER_MAINTENANCE: ; default: @@ -428,7 +428,7 @@ static const char* const timer_state_table[_TIMER_STATE_MAX] = { [TIMER_WAITING] = "waiting", [TIMER_RUNNING] = "running", [TIMER_ELAPSED] = "elapsed", - [TIMER_MAINTAINANCE] = "maintainance" + [TIMER_MAINTENANCE] = "maintenance" }; DEFINE_STRING_TABLE_LOOKUP(timer_state, TimerState);