aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-09-29 18:17:25 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-09-29 18:17:25 +0200
commit6f97b30a904407c1f1701d937d9258ca9175c6ab (patch)
tree093a86cb555fb3e7f365cea21095a7df8d5dce77 /init
parentf625836e6059d307e951a60b60f1c9ed259ee983 (diff)
downloadbusybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.tar.gz
busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.tar.bz2
busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.zip
use %m printf specifier where appropriate
function old new delta out 85 75 -10 udhcpd_main 1472 1461 -11 open_stdio_to_tty 98 85 -13 init_exec 245 232 -13 udhcpc_main 2763 2749 -14 do_cmd 4771 4755 -16 status_line_bold_errno 32 14 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-95) Total: -95 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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)
391 /* fd can be only < 0 or 0: */ 391 /* fd can be only < 0 or 0: */
392 fd = device_open(tty_name, O_RDWR); 392 fd = device_open(tty_name, O_RDWR);
393 if (fd) { 393 if (fd) {
394 message(L_LOG | L_CONSOLE, "can't open %s: %s", 394 message(L_LOG | L_CONSOLE, "can't open %s: "STRERROR_FMT,
395 tty_name, strerror(errno)); 395 tty_name
396 STRERROR_ERRNO
397 );
396 return 0; /* failure */ 398 return 0; /* failure */
397 } 399 }
398 dup2(STDIN_FILENO, STDOUT_FILENO); 400 dup2(STDIN_FILENO, STDOUT_FILENO);
@@ -469,7 +471,7 @@ static void init_exec(const char *command)
469 } 471 }
470 /* Here command never contains the dash, cmd[0] might */ 472 /* Here command never contains the dash, cmd[0] might */
471 BB_EXECVP(command, cmd); 473 BB_EXECVP(command, cmd);
472 message(L_LOG | L_CONSOLE, "can't run '%s': %s", command, strerror(errno)); 474 message(L_LOG | L_CONSOLE, "can't run '%s': "STRERROR_FMT, command STRERROR_ERRNO);
473 /* returns if execvp fails */ 475 /* returns if execvp fails */
474} 476}
475 477