projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aab14b1
)
unit: when merging a device, follow the merge first
author
Lennart Poettering
<lennart@poettering.net>
Thu, 8 Apr 2010 02:34:42 +0000
(
04:34
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 8 Apr 2010 02:35:03 +0000
(
04:35
+0200)
unit.c
patch
|
blob
|
history
diff --git
a/unit.c
b/unit.c
index
6fa8783
..
392be84
100644
(file)
--- 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 */