chiark / gitweb /
inhibit: make the output more readable
[elogind.git] / src / login / logind-user.c
index 9dfead9d5d706213d690b4f66e3dda34fdfbe016..411215a92534cbbb466115840e5967ba6b778640 100644 (file)
@@ -29,6 +29,7 @@
 #include "cgroup-util.h"
 #include "hashmap.h"
 #include "strv.h"
+#include "fileio.h"
 
 User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) {
         User *u;
@@ -339,7 +340,9 @@ static int user_create_cgroup(User *u) {
                         log_warning("Failed to create cgroup %s:%s: %s", *k, p, strerror(-r));
         }
 
-        hashmap_put(u->manager->user_cgroups, u->cgroup_path, u);
+        r = hashmap_put(u->manager->user_cgroups, u->cgroup_path, u);
+        if (r < 0)
+                log_warning("Failed to create mapping between cgroup and user");
 
         return 0;
 }