aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-01 11:58:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-01 11:58:38 +0000
commit0c97c9d43707da745fe2bc62ab2a69497ceaf666 (patch)
tree267d0feb99f457b68c09315b3f3aebe8dfd6d411 /findutils
parentd65ea39ffc7503807fa95e8840c012a80c83e4f3 (diff)
downloadbusybox-w32-0c97c9d43707da745fe2bc62ab2a69497ceaf666.tar.gz
busybox-w32-0c97c9d43707da745fe2bc62ab2a69497ceaf666.tar.bz2
busybox-w32-0c97c9d43707da745fe2bc62ab2a69497ceaf666.zip
'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
263 bytes saved.
Diffstat (limited to 'findutils')
-rw-r--r--findutils/find.c6
-rw-r--r--findutils/grep.c4
-rw-r--r--findutils/xargs.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/findutils/find.c b/findutils/find.c
index f3167a083..b61881497 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -277,7 +277,7 @@ ACTF(exec)
277 277
278 rc = spawn_and_wait(argv); 278 rc = spawn_and_wait(argv);
279 if (rc < 0) 279 if (rc < 0)
280 bb_perror_msg("%s", argv[0]); 280 bb_simple_perror_msg(argv[0]);
281 281
282 i = 0; 282 i = 0;
283 while (argv[i]) 283 while (argv[i])
@@ -347,7 +347,7 @@ ACTF(delete)
347 rc = unlink(fileName); 347 rc = unlink(fileName);
348 } 348 }
349 if (rc < 0) 349 if (rc < 0)
350 bb_perror_msg("%s", fileName); 350 bb_simple_perror_msg(fileName);
351 return TRUE; 351 return TRUE;
352} 352}
353#endif 353#endif
@@ -780,7 +780,7 @@ static action*** parse_params(char **argv)
780 ap->context = NULL; 780 ap->context = NULL;
781 /* SELinux headers erroneously declare non-const parameter */ 781 /* SELinux headers erroneously declare non-const parameter */
782 if (selinux_raw_to_trans_context((char*)arg1, &ap->context)) 782 if (selinux_raw_to_trans_context((char*)arg1, &ap->context))
783 bb_perror_msg("%s", arg1); 783 bb_simple_perror_msg(arg1);
784 } 784 }
785#endif 785#endif
786 else { 786 else {
diff --git a/findutils/grep.c b/findutils/grep.c
index 3a9c74073..2d886a025 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
369 FILE *file = fopen(filename, "r"); 369 FILE *file = fopen(filename, "r");
370 if (file == NULL) { 370 if (file == NULL) {
371 if (!SUPPRESS_ERR_MSGS) 371 if (!SUPPRESS_ERR_MSGS)
372 bb_perror_msg("%s", cur_file); 372 bb_simple_perror_msg(cur_file);
373 open_errors = 1; 373 open_errors = 1;
374 return 0; 374 return 0;
375 } 375 }
@@ -517,7 +517,7 @@ int grep_main(int argc, char **argv)
517 file = fopen(cur_file, "r"); 517 file = fopen(cur_file, "r");
518 if (file == NULL) { 518 if (file == NULL) {
519 if (!SUPPRESS_ERR_MSGS) 519 if (!SUPPRESS_ERR_MSGS)
520 bb_perror_msg("%s", cur_file); 520 bb_simple_perror_msg(cur_file);
521 open_errors = 1; 521 open_errors = 1;
522 continue; 522 continue;
523 } 523 }
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 7a8899631..f7c7832d5 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -57,7 +57,7 @@ static int xargs_exec(char **args)
57 57
58 status = spawn_and_wait(args); 58 status = spawn_and_wait(args);
59 if (status < 0) { 59 if (status < 0) {
60 bb_perror_msg("%s", args[0]); 60 bb_simple_perror_msg(args[0]);
61 return errno == ENOENT ? 127 : 126; 61 return errno == ENOENT ? 127 : 126;
62 } 62 }
63 if (status == 255) { 63 if (status == 255) {