int r = 0;
char *name;
DIR *d;
+ int k;
r = cg_enumerate_subgroups(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_path, &d);
if (r < 0) {
return r;
}
- while ((r = cg_read_subgroup(d, &name)) > 0) {
+ while ((k = cg_read_subgroup(d, &name)) > 0) {
User *user;
- int k;
k = manager_add_user_by_name(m, name, &user);
if (k < 0) {
free(name);
}
+ if (r >= 0 && k < 0)
+ r = k;
+
closedir(d);
return r;
else
r = udev_enumerate_add_match_tag(e, "seat");
+ if (r < 0)
+ goto finish;
+
r = udev_enumerate_scan_devices(e);
if (r < 0)
goto finish;
printf(")%s\n", off);
- on = off = NULL;
-
if (i->main_pid == p->pid &&
i->start_timestamp == p->start_timestamp &&
i->exit_timestamp == p->start_timestamp)
/* retry umount, until nothing can be umounted anymore */
do {
umount_changed = false;
- r = mount_points_list_umount(&mp_list_head, &umount_changed, false);
+
+ mount_points_list_umount(&mp_list_head, &umount_changed, false);
if (umount_changed)
*changed = true;
- } while(umount_changed);
+
+ } while (umount_changed);
+
/* umount one more time with logging enabled */
r = mount_points_list_umount(&mp_list_head, &umount_changed, true);
if (r <= 0)