From 0c97c9d43707da745fe2bc62ab2a69497ceaf666 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 1 Oct 2007 11:58:38 +0000 Subject: 'simple' error message functions by Loic Grenie . 263 bytes saved. --- findutils/find.c | 6 +++--- findutils/grep.c | 4 ++-- findutils/xargs.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'findutils') diff --git a/findutils/find.c b/findutils/find.c index f3167a0..b618814 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -277,7 +277,7 @@ ACTF(exec) rc = spawn_and_wait(argv); if (rc < 0) - bb_perror_msg("%s", argv[0]); + bb_simple_perror_msg(argv[0]); i = 0; while (argv[i]) @@ -347,7 +347,7 @@ ACTF(delete) rc = unlink(fileName); } if (rc < 0) - bb_perror_msg("%s", fileName); + bb_simple_perror_msg(fileName); return TRUE; } #endif @@ -780,7 +780,7 @@ static action*** parse_params(char **argv) ap->context = NULL; /* SELinux headers erroneously declare non-const parameter */ if (selinux_raw_to_trans_context((char*)arg1, &ap->context)) - bb_perror_msg("%s", arg1); + bb_simple_perror_msg(arg1); } #endif else { diff --git a/findutils/grep.c b/findutils/grep.c index 3a9c740..2d886a0 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -369,7 +369,7 @@ static int file_action_grep(const char *filename, struct stat *statbuf, void* ma FILE *file = fopen(filename, "r"); if (file == NULL) { if (!SUPPRESS_ERR_MSGS) - bb_perror_msg("%s", cur_file); + bb_simple_perror_msg(cur_file); open_errors = 1; return 0; } @@ -517,7 +517,7 @@ int grep_main(int argc, char **argv) file = fopen(cur_file, "r"); if (file == NULL) { if (!SUPPRESS_ERR_MSGS) - bb_perror_msg("%s", cur_file); + bb_simple_perror_msg(cur_file); open_errors = 1; continue; } diff --git a/findutils/xargs.c b/findutils/xargs.c index 7a88996..f7c7832 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -57,7 +57,7 @@ static int xargs_exec(char **args) status = spawn_and_wait(args); if (status < 0) { - bb_perror_msg("%s", args[0]); + bb_simple_perror_msg(args[0]); return errno == ENOENT ? 127 : 126; } if (status == 255) { -- cgit v1.1