X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-user.c;h=9ff1302663e0ebeaa31edafe904eb11df3ab8566;hb=c9a267b1b7009065a67dbf2c638b03c6801f7bbe;hp=d2a4f7e9cbf9095d26d5ee12a5a96fe051b3caac;hpb=da927ba997d68401563b927f92e6e40e021a8e5c;p=elogind.git diff --git a/src/login/logind-user.c b/src/login/logind-user.c index d2a4f7e9c..9ff130266 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -310,10 +310,8 @@ static int user_mkdir_runtime_path(User *u) { assert(u); r = mkdir_safe_label("/run/user", 0755, 0, 0); - if (r < 0) { - log_error_errno(r, "Failed to create /run/user: %m"); - return r; - } + if (r < 0) + return log_error_errno(r, "Failed to create /run/user: %m"); if (!u->runtime_path) { if (asprintf(&p, "/run/user/" UID_FMT, u->uid) < 0) @@ -513,7 +511,7 @@ static int user_remove_runtime_path(User *u) { log_error_errno(r, "Failed to remove runtime directory %s: %m", u->runtime_path); if (umount2(u->runtime_path, MNT_DETACH) < 0) - log_error("Failed to unmount user runtime directory %s: %m", u->runtime_path); + log_error_errno(errno, "Failed to unmount user runtime directory %s: %m", u->runtime_path); r = rm_rf(u->runtime_path, false, true, false); if (r < 0)