diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-08 04:34:42 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-08 04:35:03 +0200 |
commit | cc91696756e1747a24def7dee0324db65ae66d7e (patch) | |
tree | 59a1df64d41037b763c21ed3d7b463c2eea0572d | |
parent | aab14b13b491c08aa3ab0c3c59b2f3885692ffea (diff) |
unit: when merging a device, follow the merge first
-rw-r--r-- | unit.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 */ |