summaryrefslogtreecommitdiff
path: root/src/login/logind-user.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:19:16 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:29:21 +0100
commitda927ba997d68401563b927f92e6e40e021a8e5c (patch)
tree71764cd998aef07b8943c5206c9307a93ba9c528 /src/login/logind-user.c
parent0a1beeb64207eaa88ab9236787b1cbc2f704ae14 (diff)
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values.
Diffstat (limited to 'src/login/logind-user.c')
-rw-r--r--src/login/logind-user.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 7a39140d88..d2a4f7e9cb 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -252,7 +252,7 @@ int user_save(User *u) {
finish:
if (r < 0)
- log_error_errno(-r, "Failed to save user data %s: %m", u->state_file);
+ log_error_errno(r, "Failed to save user data %s: %m", u->state_file);
return r;
}
@@ -278,7 +278,7 @@ int user_load(User *u) {
if (r == -ENOENT)
return 0;
- log_error_errno(-r, "Failed to read %s: %m", u->state_file);
+ log_error_errno(r, "Failed to read %s: %m", u->state_file);
return r;
}
@@ -311,7 +311,7 @@ static int user_mkdir_runtime_path(User *u) {
r = mkdir_safe_label("/run/user", 0755, 0, 0);
if (r < 0) {
- log_error_errno(-r, "Failed to create /run/user: %m");
+ log_error_errno(r, "Failed to create /run/user: %m");
return r;
}
@@ -338,7 +338,7 @@ static int user_mkdir_runtime_path(User *u) {
r = mount("tmpfs", p, "tmpfs", MS_NODEV|MS_NOSUID, t);
if (r < 0) {
- log_error_errno(-r, "Failed to mount per-user tmpfs directory %s: %m", p);
+ log_error_errno(r, "Failed to mount per-user tmpfs directory %s: %m", p);
goto fail;
}
}
@@ -510,14 +510,14 @@ static int user_remove_runtime_path(User *u) {
r = rm_rf(u->runtime_path, false, false, false);
if (r < 0)
- log_error_errno(-r, "Failed to remove runtime directory %s: %m", u->runtime_path);
+ 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);
r = rm_rf(u->runtime_path, false, true, false);
if (r < 0)
- log_error_errno(-r, "Failed to remove runtime directory %s: %m", u->runtime_path);
+ log_error_errno(r, "Failed to remove runtime directory %s: %m", u->runtime_path);
free(u->runtime_path);
u->runtime_path = NULL;