chiark / gitweb /
unit: simplify things a little by introducing API to add two dependencies in one...
[elogind.git] / src / socket.c
index 8edf0ce5912f1a44857ae8e7ad1ccc2e78fb1425..91eea7d294895bca43d481d68c2949a62929546f 100644 (file)
@@ -204,10 +204,7 @@ int socket_add_one_mount_link(Socket *s, Mount *m) {
         if (!socket_needs_mount(s, m->where))
                 return 0;
 
-        if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(s), true)) < 0)
-                return r;
-
-        if ((r = unit_add_dependency(UNIT(s), UNIT_REQUIRES, UNIT(m), true)) < 0)
+        if ((r = unit_add_two_dependencies(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true)) < 0)
                 return r;
 
         return 0;