summaryrefslogtreecommitdiffhomepage
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c
index 64e5c3e0b..5304e5c2c 100644
--- a/init/init.c
+++ b/init/init.c
@@ -391,8 +391,10 @@ static int open_stdio_to_tty(const char* tty_name)
/* fd can be only < 0 or 0: */
fd = device_open(tty_name, O_RDWR);
if (fd) {
- message(L_LOG | L_CONSOLE, "can't open %s: %s",
- tty_name, strerror(errno));
+ message(L_LOG | L_CONSOLE, "can't open %s: "STRERROR_FMT,
+ tty_name
+ STRERROR_ERRNO
+ );
return 0; /* failure */
}
dup2(STDIN_FILENO, STDOUT_FILENO);
@@ -469,7 +471,7 @@ static void init_exec(const char *command)
}
/* Here command never contains the dash, cmd[0] might */
BB_EXECVP(command, cmd);
- message(L_LOG | L_CONSOLE, "can't run '%s': %s", command, strerror(errno));
+ message(L_LOG | L_CONSOLE, "can't run '%s': "STRERROR_FMT, command STRERROR_ERRNO);
/* returns if execvp fails */
}