X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Funit.c;h=edc636412d98f682b62a6ca973c35783f347fd8b;hb=96a8cbfae1b37cf0a9c0591bfef93f9de1561bc4;hp=ee1dc85d50365cbd791ba1873c0064cc3065467f;hpb=92ab323c824300683efb11fd43c9d834cea9b9e6;p=elogind.git diff --git a/src/unit.c b/src/unit.c index ee1dc85d5..edc636412 100644 --- a/src/unit.c +++ b/src/unit.c @@ -1456,15 +1456,6 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen if (u == other) return 0; - if (UNIT_VTABLE(u)->no_requires && - (d == UNIT_REQUIRES || - d == UNIT_REQUIRES_OVERRIDABLE || - d == UNIT_REQUISITE || - d == UNIT_REQUISITE_OVERRIDABLE || - d == UNIT_BIND_TO)) { - return -EINVAL; - } - if ((r = set_ensure_allocated(&u->meta.dependencies[d], trivial_hash_func, trivial_compare_func)) < 0) return r; @@ -2319,6 +2310,18 @@ int unit_kill(Unit *u, KillWho w, KillMode m, int signo, DBusError *error) { return UNIT_VTABLE(u)->kill(u, w, m, signo, error); } + +int unit_following_set(Unit *u, Set **s) { + assert(u); + assert(s); + + if (UNIT_VTABLE(u)->following_set) + return UNIT_VTABLE(u)->following_set(u, s); + + *s = NULL; + return 0; +} + static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = { [UNIT_STUB] = "stub", [UNIT_LOADED] = "loaded",