From: Lennart Poettering Date: Thu, 8 Apr 2010 02:34:42 +0000 (+0200) Subject: unit: when merging a device, follow the merge first X-Git-Tag: 0.git+20100605+dfd8ee-1~194 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc91696756e1747a24def7dee0324db65ae66d7e;p=systemd unit: when merging a device, follow the merge first --- diff --git a/unit.c b/unit.c index 6fa87834..392be841 100644 --- a/unit.c +++ b/unit.c @@ -394,6 +394,8 @@ int unit_merge(Unit *u, Unit *other) { assert(other); assert(u->meta.manager == other->meta.manager); + other = unit_follow_merge(other); + if (other == u) return 0; @@ -403,7 +405,8 @@ int unit_merge(Unit *u, Unit *other) { if (u->meta.type != u->meta.type) return -EINVAL; - if (other->meta.load_state != UNIT_STUB) + if (other->meta.load_state != UNIT_STUB && + other->meta.load_state != UNIT_FAILED) return -EEXIST; /* Merge names */