summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-03 19:46:38 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-03 19:46:38 +0200
commit2c966c038dc32ef39baa176371395cde4e541d01 (patch)
tree39f5104335943ad00f5f272e6d3d9de58fa8fae6 /src/mount.c
parentc5da34ef1ba450351638be0d71bddb54677a4d6e (diff)
unit: simplify things a little by introducing API to add two dependencies in one step
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mount.c b/src/mount.c
index db8551e854..6b38741c35 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -262,11 +262,7 @@ static int mount_add_target_links(Mount *m) {
if ((r = unit_load_related_unit(UNIT(m), ".automount", &am)) < 0)
return r;
- if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(am), true)) < 0)
- return r;
-
- return unit_add_dependency(UNIT(am), UNIT_BEFORE, tu, true);
-
+ return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_WANTS, UNIT(am), true);
} else {
if (!noauto && handle)