diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-29 18:17:25 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-29 18:17:25 +0200 |
commit | 6f97b30a904407c1f1701d937d9258ca9175c6ab (patch) | |
tree | 093a86cb555fb3e7f365cea21095a7df8d5dce77 /shell | |
parent | f625836e6059d307e951a60b60f1c9ed259ee983 (diff) | |
download | busybox-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 'shell')
-rw-r--r-- | shell/ash.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c index 3fa7f4d9f..39705a350 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1312,16 +1312,9 @@ ash_msg_and_raise_error(const char *msg, ...) | |||
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | /* | 1314 | /* |
1315 | * Use '%m' to append error string on platforms that support it, '%s' and | ||
1316 | * strerror() on those that don't. | ||
1317 | * | ||
1318 | * 'fmt' must be a string literal. | 1315 | * 'fmt' must be a string literal. |
1319 | */ | 1316 | */ |
1320 | #ifdef HAVE_PRINTF_PERCENTM | 1317 | #define ash_msg_and_raise_perror(fmt, ...) ash_msg_and_raise_error(fmt ": "STRERROR_FMT, ##__VA_ARGS__ STRERROR_ERRNO) |
1321 | #define ash_msg_and_raise_perror(fmt, ...) ash_msg_and_raise_error(fmt ": %m", ##__VA_ARGS__) | ||
1322 | #else | ||
1323 | #define ash_msg_and_raise_perror(fmt, ...) ash_msg_and_raise_error(fmt ": %s", ##__VA_ARGS__, strerror(errno)) | ||
1324 | #endif | ||
1325 | 1318 | ||
1326 | static void raise_error_syntax(const char *) NORETURN; | 1319 | static void raise_error_syntax(const char *) NORETURN; |
1327 | static void | 1320 | static void |