diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-15 15:40:16 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-15 15:40:16 +0200 |
commit | 4f731ce30ec2a9f5e9b231b47aa68f32b75feb35 (patch) | |
tree | f63b07e88c4f31b4b3d1b5a1deeac971785158e6 /findutils/xargs.c | |
parent | c37fecb86c52da9e2781ee9eeb90d5d8894f59e0 (diff) | |
download | busybox-w32-4f731ce30ec2a9f5e9b231b47aa68f32b75feb35.tar.gz busybox-w32-4f731ce30ec2a9f5e9b231b47aa68f32b75feb35.tar.bz2 busybox-w32-4f731ce30ec2a9f5e9b231b47aa68f32b75feb35.zip |
findutils/*: move usage and applet bits to *.c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'findutils/xargs.c')
-rw-r--r-- | findutils/xargs.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c index 8caaff91c..46a62cbf1 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * Mini xargs implementation for busybox | 3 | * Mini xargs implementation for busybox |
4 | * Options are supported: "-prtx -n max_arg -s max_chars -e[ouf_str]" | ||
5 | * | 4 | * |
6 | * (C) 2002,2003 by Vladimir Oleynik <dzo@simtreas.ru> | 5 | * (C) 2002,2003 by Vladimir Oleynik <dzo@simtreas.ru> |
7 | * | 6 | * |
@@ -14,9 +13,10 @@ | |||
14 | * | 13 | * |
15 | * xargs is described in the Single Unix Specification v3 at | 14 | * xargs is described in the Single Unix Specification v3 at |
16 | * http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html | 15 | * http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html |
17 | * | ||
18 | */ | 16 | */ |
19 | 17 | ||
18 | //applet:IF_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_DROP, xargs)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_XARGS) += xargs.o | 20 | //kbuild:lib-$(CONFIG_XARGS) += xargs.o |
21 | 21 | ||
22 | //config:config XARGS | 22 | //config:config XARGS |
@@ -351,6 +351,29 @@ static int xargs_ask_confirmation(void) | |||
351 | # define xargs_ask_confirmation() 1 | 351 | # define xargs_ask_confirmation() 1 |
352 | #endif | 352 | #endif |
353 | 353 | ||
354 | //usage:#define xargs_trivial_usage | ||
355 | //usage: "[OPTIONS] [PROG ARGS]" | ||
356 | //usage:#define xargs_full_usage "\n\n" | ||
357 | //usage: "Run PROG on every item given by stdin\n" | ||
358 | //usage: "\nOptions:" | ||
359 | //usage: IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( | ||
360 | //usage: "\n -p Ask user whether to run each command" | ||
361 | //usage: ) | ||
362 | //usage: "\n -r Don't run command if input is empty" | ||
363 | //usage: IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( | ||
364 | //usage: "\n -0 Input is separated by NUL characters" | ||
365 | //usage: ) | ||
366 | //usage: "\n -t Print the command on stderr before execution" | ||
367 | //usage: "\n -e[STR] STR stops input processing" | ||
368 | //usage: "\n -n N Pass no more than N args to PROG" | ||
369 | //usage: "\n -s N Pass command line of no more than N bytes" | ||
370 | //usage: IF_FEATURE_XARGS_SUPPORT_TERMOPT( | ||
371 | //usage: "\n -x Exit if size is exceeded" | ||
372 | //usage: ) | ||
373 | //usage:#define xargs_example_usage | ||
374 | //usage: "$ ls | xargs gzip\n" | ||
375 | //usage: "$ find . -name '*.c' -print | xargs rm\n" | ||
376 | |||
354 | /* Correct regardless of combination of CONFIG_xxx */ | 377 | /* Correct regardless of combination of CONFIG_xxx */ |
355 | enum { | 378 | enum { |
356 | OPTBIT_VERBOSE = 0, | 379 | OPTBIT_VERBOSE = 0, |