summaryrefslogtreecommitdiff
path: root/src/automount.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/automount.c
parentc5da34ef1ba450351638be0d71bddb54677a4d6e (diff)
unit: simplify things a little by introducing API to add two dependencies in one step
Diffstat (limited to 'src/automount.c')
-rw-r--r--src/automount.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/automount.c b/src/automount.c
index b8d7ad25f4..0689ec7789 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -125,10 +125,7 @@ int automount_add_one_mount_link(Automount *a, Mount *m) {
if (path_equal(a->where, m->where))
return 0;
- if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(a), true)) < 0)
- return r;
-
- if ((r = unit_add_dependency(UNIT(a), UNIT_REQUIRES, UNIT(m), true)) < 0)
+ if ((r = unit_add_two_dependencies(UNIT(a), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true)) < 0)
return r;
return 0;