diff options
Diffstat (limited to 'src/core/unit-dependency-atom.c')
-rw-r--r-- | src/core/unit-dependency-atom.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/core/unit-dependency-atom.c b/src/core/unit-dependency-atom.c index 333eea6c3d..81333523e7 100644 --- a/src/core/unit-dependency-atom.c +++ b/src/core/unit-dependency-atom.c @@ -82,13 +82,11 @@ static const UnitDependencyAtom atom_map[_UNIT_DEPENDENCY_MAX] = { [UNIT_PROPAGATES_STOP_TO] = UNIT_ATOM_RETROACTIVE_STOP_ON_STOP | UNIT_ATOM_PROPAGATE_STOP, - [UNIT_ON_FAILURE] = UNIT_ATOM_ON_FAILURE | - UNIT_ATOM_BACK_REFERENCE_IMPLIED, - - [UNIT_ON_SUCCESS] = UNIT_ATOM_ON_SUCCESS | - UNIT_ATOM_BACK_REFERENCE_IMPLIED, - /* These are simple dependency types: they consist of a single atom only */ + [UNIT_ON_FAILURE] = UNIT_ATOM_ON_FAILURE, + [UNIT_ON_SUCCESS] = UNIT_ATOM_ON_SUCCESS, + [UNIT_ON_FAILURE_OF] = UNIT_ATOM_ON_FAILURE_OF, + [UNIT_ON_SUCCESS_OF] = UNIT_ATOM_ON_SUCCESS_OF, [UNIT_BEFORE] = UNIT_ATOM_BEFORE, [UNIT_AFTER] = UNIT_ATOM_AFTER, [UNIT_TRIGGERS] = UNIT_ATOM_TRIGGERS, @@ -104,8 +102,6 @@ static const UnitDependencyAtom atom_map[_UNIT_DEPENDENCY_MAX] = { * things discoverable/debuggable as they are the inverse dependencies to some of the above. As they * have no effect of their own, they all map to no atoms at all, i.e. the value 0. */ [UNIT_RELOAD_PROPAGATED_FROM] = 0, - [UNIT_ON_SUCCESS_OF] = 0, - [UNIT_ON_FAILURE_OF] = 0, [UNIT_STOP_PROPAGATED_FROM] = 0, }; @@ -200,17 +196,19 @@ UnitDependency unit_dependency_from_unique_atom(UnitDependencyAtom atom) { case UNIT_ATOM_PROPAGATE_STOP_FAILURE: return UNIT_CONFLICTED_BY; - case UNIT_ATOM_ON_FAILURE | - UNIT_ATOM_BACK_REFERENCE_IMPLIED: + /* And now, the simple ones */ + case UNIT_ATOM_ON_FAILURE: return UNIT_ON_FAILURE; - case UNIT_ATOM_ON_SUCCESS | - UNIT_ATOM_BACK_REFERENCE_IMPLIED: case UNIT_ATOM_ON_SUCCESS: return UNIT_ON_SUCCESS; - /* And now, the simple ones */ + case UNIT_ATOM_ON_SUCCESS_OF: + return UNIT_ON_SUCCESS_OF; + + case UNIT_ATOM_ON_FAILURE_OF: + return UNIT_ON_FAILURE_OF; case UNIT_ATOM_BEFORE: return UNIT_BEFORE; |