summaryrefslogtreecommitdiff
path: root/src/core/shutdown.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/core/shutdown.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/core/shutdown.c')
-rw-r--r--src/core/shutdown.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index 53c701a8f0..923cd3b16c 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -240,7 +240,7 @@ int main(int argc, char *argv[]) {
} else if (r > 0)
log_info("Not all file systems unmounted, %d left.", r);
else
- log_error_errno(-r, "Failed to unmount file systems: %m");
+ log_error_errno(r, "Failed to unmount file systems: %m");
}
if (need_swapoff) {
@@ -252,7 +252,7 @@ int main(int argc, char *argv[]) {
} else if (r > 0)
log_info("Not all swaps deactivated, %d left.", r);
else
- log_error_errno(-r, "Failed to deactivate swaps: %m");
+ log_error_errno(r, "Failed to deactivate swaps: %m");
}
if (need_loop_detach) {
@@ -264,7 +264,7 @@ int main(int argc, char *argv[]) {
} else if (r > 0)
log_info("Not all loop devices detached, %d left.", r);
else
- log_error_errno(-r, "Failed to detach loop devices: %m");
+ log_error_errno(r, "Failed to detach loop devices: %m");
}
if (need_dm_detach) {
@@ -276,7 +276,7 @@ int main(int argc, char *argv[]) {
} else if (r > 0)
log_info("Not all DM devices detached, %d left.", r);
else
- log_error_errno(-r, "Failed to detach DM devices: %m");
+ log_error_errno(r, "Failed to detach DM devices: %m");
}
if (!need_umount && !need_swapoff && !need_loop_detach && !need_dm_detach) {
@@ -329,7 +329,7 @@ int main(int argc, char *argv[]) {
execv("/shutdown", argv);
log_error("Failed to execute shutdown binary: %m");
} else
- log_error_errno(-r, "Failed to switch root to \"/run/initramfs\": %m");
+ log_error_errno(r, "Failed to switch root to \"/run/initramfs\": %m");
}
@@ -416,7 +416,7 @@ int main(int argc, char *argv[]) {
r = -errno;
error:
- log_emergency_errno(-r, "Critical error while doing system shutdown: %m");
+ log_emergency_errno(r, "Critical error while doing system shutdown: %m");
freeze();
}