core: add a reverse dep for OnFailure=
Let's add an implicit reverse dep OnFailureOf=. This is exposed via the bus to make things more debuggable: you can now ask systemd for which units a specific unit is the failure handler. OnFailure= was the only dependency type that had no inverse, this fixes that. Now that deps are a bit cheaper, it should be OK to add deps that only serve debug purposes.
This commit is contained in:
+2
-1
@@ -2871,7 +2871,8 @@ int unit_add_dependency(
|
||||
[UNIT_CONFLICTED_BY] = UNIT_CONFLICTS,
|
||||
[UNIT_BEFORE] = UNIT_AFTER,
|
||||
[UNIT_AFTER] = UNIT_BEFORE,
|
||||
[UNIT_ON_FAILURE] = _UNIT_DEPENDENCY_INVALID,
|
||||
[UNIT_ON_FAILURE] = UNIT_ON_FAILURE_OF,
|
||||
[UNIT_ON_FAILURE_OF] = UNIT_ON_FAILURE,
|
||||
[UNIT_REFERENCES] = UNIT_REFERENCED_BY,
|
||||
[UNIT_REFERENCED_BY] = UNIT_REFERENCES,
|
||||
[UNIT_TRIGGERS] = UNIT_TRIGGERED_BY,
|
||||
|
||||
Reference in New Issue
Block a user