diff options
-rw-r--r-- | src/logind.c | 7 | ||||
-rw-r--r-- | src/sysfs-show.c | 3 | ||||
-rw-r--r-- | src/systemctl.c | 2 | ||||
-rw-r--r-- | src/umount.c | 7 |
4 files changed, 13 insertions, 6 deletions
diff --git a/src/logind.c b/src/logind.c index 1aad48d2dc..4633a5ef29 100644 --- a/src/logind.c +++ b/src/logind.c @@ -413,6 +413,7 @@ static int manager_enumerate_users_from_cgroup(Manager *m) { int r = 0; char *name; DIR *d; + int k; r = cg_enumerate_subgroups(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_path, &d); if (r < 0) { @@ -423,9 +424,8 @@ static int manager_enumerate_users_from_cgroup(Manager *m) { 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) { @@ -446,6 +446,9 @@ static int manager_enumerate_users_from_cgroup(Manager *m) { free(name); } + if (r >= 0 && k < 0) + r = k; + closedir(d); return r; diff --git a/src/sysfs-show.c b/src/sysfs-show.c index ab866a4707..b8b356d77b 100644 --- a/src/sysfs-show.c +++ b/src/sysfs-show.c @@ -165,6 +165,9 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { 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; diff --git a/src/systemctl.c b/src/systemctl.c index fdff2d1250..2bf2b697e2 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -2154,8 +2154,6 @@ static void print_status_info(UnitStatusInfo *i) { 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) diff --git a/src/umount.c b/src/umount.c index 67be42ea33..4e036d82a3 100644 --- a/src/umount.c +++ b/src/umount.c @@ -565,10 +565,13 @@ int umount_all(bool *changed) { /* 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) |