aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-02-25 13:22:37 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-02-25 13:22:37 +0100
commit2e73d84c02c6dd4945838665ce0167bddbb7f1c8 (patch)
tree7ef72ebf47297b04245dc348c59f69290a629034
parent8031848938032b786c71d1fadebea47e5451c19a (diff)
downloadbusybox-w32-2e73d84c02c6dd4945838665ce0167bddbb7f1c8.tar.gz
busybox-w32-2e73d84c02c6dd4945838665ce0167bddbb7f1c8.tar.bz2
busybox-w32-2e73d84c02c6dd4945838665ce0167bddbb7f1c8.zip
find: tweak error message
big find: find: missing argument to `-exec' we now say find: -exec requires an argument instead of the cryptic message we emitted previously. Additional benefit is that it's now 23 bytes smaller. Add TODO to add '-exec {} +' support Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r--findutils/find.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/findutils/find.c b/findutils/find.c
index 4bc3b38dc..f45abbe36 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -674,10 +674,14 @@ static action*** parse_params(char **argv)
674 ap->exec_argv = ++argv; /* first arg after -exec */ 674 ap->exec_argv = ++argv; /* first arg after -exec */
675 ap->exec_argc = 0; 675 ap->exec_argc = 0;
676 while (1) { 676 while (1) {
677 if (!*argv) /* did not see ';' until end */ 677 if (!*argv) /* did not see ';' or '+' until end */
678 bb_error_msg_and_die("-exec CMD must end by ';'"); 678 bb_error_msg_and_die(bb_msg_requires_arg, "-exec");
679 if (LONE_CHAR(argv[0], ';')) 679 if (LONE_CHAR(argv[0], ';'))
680 break; 680 break;
681 //TODO: implement {} + (like xargs)
682 // See:
683 // find findutils/ -exec echo ">"{}"<" \;
684 // find findutils/ -exec echo ">"{}"<" +
681 argv++; 685 argv++;
682 ap->exec_argc++; 686 ap->exec_argc++;
683 } 687 }