unit: unify how we assing slices to units

This adds a new call unit_set_slice(), and simplifies
unit_add_default_slice(). THis should make our code a bit more robust
and simpler.
This commit is contained in:
Lennart Poettering
2015-08-31 13:20:43 +02:00
parent 35b7ff80e2
commit d79200e26e
9 changed files with 65 additions and 42 deletions
+1 -1
View File
@@ -345,7 +345,7 @@ static int socket_add_extras(Socket *s) {
if (r < 0)
return r;
r = unit_add_default_slice(u, &s->cgroup_context);
r = unit_set_default_slice(u);
if (r < 0)
return r;
}