X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=unit.c;h=3b30c8265f579d6330cd854faf1c01d6b6abfd1d;hb=10a94420172b33a7472a16b2e829689dbc570cad;hp=7d570056b4a41da04bf1b335364a92de9baf6ac0;hpb=80876c20f64f87765242bc35895977ab6a855729;p=elogind.git diff --git a/unit.c b/unit.c index 7d570056b..3b30c8265 100644 --- a/unit.c +++ b/unit.c @@ -334,6 +334,12 @@ UnitActiveState unit_active_state(Unit *u) { return UNIT_VTABLE(u)->active_state(u); } +const char* unit_sub_state_to_string(Unit *u) { + assert(u); + + return UNIT_VTABLE(u)->sub_state_to_string(u); +} + static void complete_move(Set **s, Set **other) { assert(s); assert(other); @@ -850,8 +856,6 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) { assert(u); assert(os < _UNIT_ACTIVE_STATE_MAX); assert(ns < _UNIT_ACTIVE_STATE_MAX); - assert(!(os == UNIT_ACTIVE && ns == UNIT_ACTIVATING)); - assert(!(os == UNIT_INACTIVE && ns == UNIT_DEACTIVATING)); /* Note that this is called for all low-level state changes, * even if they might map to the same high-level