chiark / gitweb /
unit: simplify things a little by introducing API to add two dependencies in one...
[elogind.git] / src / path.c
index 80dc3c44d08f42fa3ff7494aad4c5b3bf333dbd1..56936fd673fd76d427c18eb8fdce7f2105279be5 100644 (file)
@@ -65,10 +65,7 @@ int path_add_one_mount_link(Path *p, Mount *m) {
                 if (!path_startswith(s->path, m->where))
                         continue;
 
-                if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(p), true)) < 0)
-                        return r;
-
-                if ((r = unit_add_dependency(UNIT(p), UNIT_REQUIRES, UNIT(m), true)) < 0)
+                if ((r = unit_add_two_dependencies(UNIT(p), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true)) < 0)
                         return r;
         }