diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-02 01:46:30 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-02 01:48:55 +0200 |
commit | fb6becb4436ae4078337011b2017ce294e7361cf (patch) | |
tree | 5e80cea85b91f039563907c830cd1d38f19c375c /src/login/logind-user-dbus.c | |
parent | 358712f3de33789b2d1293825f1add2c6f4b8e66 (diff) |
logind: port over to use scopes+slices for all cgroup stuff
In order to prepare things for the single-writer cgroup scheme, let's
make logind use systemd's own primitives for cgroup management.
Every login user now gets his own private slice unit, in which his sessions
live in a scope unit each. Also, add user@$UID.service to the same
slice, and implicitly start it on first login.
Diffstat (limited to 'src/login/logind-user-dbus.c')
-rw-r--r-- | src/login/logind-user-dbus.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c index 2a2825308d..fa2ecba53c 100644 --- a/src/login/logind-user-dbus.c +++ b/src/login/logind-user-dbus.c @@ -38,7 +38,6 @@ " <property name=\"Timestamp\" type=\"t\" access=\"read\"/>\n" \ " <property name=\"TimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \ " <property name=\"RuntimePath\" type=\"s\" access=\"read\"/>\n" \ - " <property name=\"DefaultControlGroup\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"Service\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"Slice\" type=\"s\" access=\"read\"/>\n" \ " <property name=\"Display\" type=\"(so)\" access=\"read\"/>\n" \ @@ -186,24 +185,6 @@ static int bus_user_append_idle_hint_since(DBusMessageIter *i, const char *prope return 0; } -static int bus_user_append_default_cgroup(DBusMessageIter *i, const char *property, void *data) { - User *u = data; - _cleanup_free_ char *t = NULL; - int r; - bool success; - - assert(i); - assert(property); - assert(u); - - r = cg_join_spec(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, &t); - if (r < 0) - return r; - - success = dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t); - return success ? 0 : -ENOMEM; -} - static int get_user_for_path(Manager *m, const char *path, User **_u) { User *u; unsigned long lu; @@ -235,7 +216,6 @@ static const BusProperty bus_login_user_properties[] = { { "Timestamp", bus_property_append_usec, "t", offsetof(User, timestamp.realtime) }, { "TimestampMonotonic", bus_property_append_usec, "t", offsetof(User, timestamp.monotonic) }, { "RuntimePath", bus_property_append_string, "s", offsetof(User, runtime_path), true }, - { "DefaultControlGroup", bus_user_append_default_cgroup, "s", 0 }, { "Service", bus_property_append_string, "s", offsetof(User, service), true }, { "Slice", bus_property_append_string, "s", offsetof(User, slice), true }, { "Display", bus_user_append_display, "(so)", 0 }, |