chiark / gitweb /
treewide: no need to negate errno for log_*_errno()
[elogind.git] / src / login / logind-user.c
index 7a39140d88b8c7e47fef1e1c518c5768cf7dd41a..d2a4f7e9cbf9095d26d5ee12a5a96fe051b3caac 100644 (file)
@@ -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;