chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treewide: use log_*_errno whenever %m is in the format string
[elogind.git]
/
src
/
core
/
shutdown.c
diff --git
a/src/core/shutdown.c
b/src/core/shutdown.c
index 923cd3b16c9f72e1f6ae9b8b8042e3c33aec9405..10455fa309a1342ecdac02875cc1b3d9c83a083b 100644
(file)
--- a/
src/core/shutdown.c
+++ b/
src/core/shutdown.c
@@
-139,12
+139,12
@@
static int parse_argv(int argc, char *argv[]) {
static int switch_root_initramfs(void) {
if (mount("/run/initramfs", "/run/initramfs", NULL, MS_BIND, NULL) < 0) {
static int switch_root_initramfs(void) {
if (mount("/run/initramfs", "/run/initramfs", NULL, MS_BIND, NULL) < 0) {
- log_error
(
"Failed to mount bind /run/initramfs on /run/initramfs: %m");
+ log_error
_errno(errno,
"Failed to mount bind /run/initramfs on /run/initramfs: %m");
return -errno;
}
if (mount(NULL, "/run/initramfs", NULL, MS_PRIVATE, NULL) < 0) {
return -errno;
}
if (mount(NULL, "/run/initramfs", NULL, MS_PRIVATE, NULL) < 0) {
- log_error
(
"Failed to make /run/initramfs private mount: %m");
+ log_error
_errno(errno,
"Failed to make /run/initramfs private mount: %m");
return -errno;
}
return -errno;
}
@@
-327,7
+327,7
@@
int main(int argc, char *argv[]) {
"Returning to initrd...");
execv("/shutdown", argv);
"Returning to initrd...");
execv("/shutdown", argv);
- log_error
(
"Failed to execute shutdown binary: %m");
+ log_error
_errno(errno,
"Failed to execute shutdown binary: %m");
} else
log_error_errno(r, "Failed to switch root to \"/run/initramfs\": %m");
} else
log_error_errno(r, "Failed to switch root to \"/run/initramfs\": %m");
@@
-359,7
+359,7
@@
int main(int argc, char *argv[]) {
pid = fork();
if (pid < 0)
pid = fork();
if (pid < 0)
- log_error
(
"Failed to fork: %m");
+ log_error
_errno(errno,
"Failed to fork: %m");
else if (pid == 0) {
const char * const args[] = {
else if (pid == 0) {
const char * const args[] = {
@@
-412,7
+412,7
@@
int main(int argc, char *argv[]) {
exit(0);
}
exit(0);
}
- log_error
(
"Failed to invoke reboot(): %m");
+ log_error
_errno(errno,
"Failed to invoke reboot(): %m");
r = -errno;
error:
r = -errno;
error: