diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/login/user-sessions.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/login/user-sessions.c b/src/login/user-sessions.c index 98b36c60e8..91531e8f38 100644 --- a/src/login/user-sessions.c +++ b/src/login/user-sessions.c @@ -69,17 +69,18 @@ int main(int argc, char*argv[]) { int r, q; char *cgroup_user_tree = NULL; - if ((r = write_one_line_file_atomic("/run/nologin", "System is going down.")) < 0) + r = write_one_line_file_atomic("/run/nologin", "System is going down."); + if (r < 0) log_error("Failed to create /run/nologin: %s", strerror(-r)); - if ((q = cg_get_user_path(&cgroup_user_tree)) < 0) { + q = cg_get_user_path(&cgroup_user_tree); + if (q < 0) { log_error("Failed to determine use path: %s", strerror(-q)); goto finish; } q = cg_kill_recursive_and_wait(SYSTEMD_CGROUP_CONTROLLER, cgroup_user_tree, true); free(cgroup_user_tree); - if (q < 0) { log_error("Failed to kill sessions: %s", strerror(-q)); goto finish; |