chiark / gitweb /
man: document that assignemnts of devices to seats are persistent
[elogind.git] / src / login / logind-user.c
index 4622812e3c66eda4a2153e13f18f8af9864df5db..aa9c3f1a319abe4cd79e96a66b444d1984d51a1b 100644 (file)
@@ -259,12 +259,8 @@ static int user_mkdir_runtime_path(User *u) {
         }
 
         if (!u->runtime_path) {
-                p = strappend("/run/user/", u->name);
-
-                if (!p) {
-                        log_error("Out of memory");
-                        return -ENOMEM;
-                }
+                if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0)
+                        return log_oom();
         } else
                 p = u->runtime_path;
 
@@ -288,10 +284,8 @@ static int user_create_cgroup(User *u) {
         assert(u);
 
         if (!u->cgroup_path) {
-                if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0) {
-                        log_error("Out of memory");
-                        return -ENOMEM;
-                }
+                if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0)
+                        return log_oom();
         } else
                 p = u->cgroup_path;