summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko2009-03-20 22:17:13 +0000
committerDenis Vlasenko2009-03-20 22:17:13 +0000
commit83518d18a34a3ddfcaac1739930d8469f5bc2442 (patch)
tree2af665365a69f2689288cc13bb65efbb59e7d520 /include
parent0b28103cc774eb1ee62362cf61d52c32d44ec2cf (diff)
downloadbusybox-83518d18a34a3ddfcaac1739930d8469f5bc2442.zip
busybox-83518d18a34a3ddfcaac1739930d8469f5bc2442.tar.gz
Compatibility fixes:
grep: support -z find: support --mindepth together +45 bytes cpio: support -p (configurable, +230 bytes) libbb: tweaks for cpio
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h10
-rw-r--r--include/usage.h35
2 files changed, 27 insertions, 18 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 8ea493b..a2042fe 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -797,9 +797,9 @@ int run_nofork_applet_prime(struct nofork_save_area *old, int applet_no, char **
* Both of the above will redirect fd 0,1,2 to /dev/null and drop ctty
* (will do setsid()).
*
- * forkexit_or_rexec(argv) = bare-bones "fork + parent exits" on MMU,
+ * fork_or_rexec(argv) = bare-bones "fork" on MMU,
* "vfork + re-exec ourself" on NOMMU. No fd redirection, no setsid().
- * Currently used for setsid only. On MMU ignores argv.
+ * On MMU ignores argv.
*
* Helper for network daemons in foreground mode:
*
@@ -813,14 +813,14 @@ enum {
DAEMON_ONLY_SANITIZE = 8, /* internal use */
};
#if BB_MMU
- void forkexit_or_rexec(void) FAST_FUNC;
+ pid_t fork_or_rexec(void) FAST_FUNC;
enum { re_execed = 0 };
-# define forkexit_or_rexec(argv) forkexit_or_rexec()
+# define fork_or_rexec(argv) fork_or_rexec()
# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags)
# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus)
#else
void re_exec(char **argv) NORETURN FAST_FUNC;
- void forkexit_or_rexec(char **argv) FAST_FUNC;
+ pid_t fork_or_rexec(char **argv) FAST_FUNC;
extern bool re_execed;
int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC;
int BUG_daemon_is_unavailable_on_nommu(void) FAST_FUNC;
diff --git a/include/usage.h b/include/usage.h
index e787543..2b5d34e 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -531,24 +531,29 @@
"\n -l,-s Create (sym)links" \
#define cpio_trivial_usage \
- "-[dim" USE_FEATURE_CPIO_O("o") "tuv][F cpiofile]" \
- USE_FEATURE_CPIO_O( "[H newc]" )
+ "-[ti" USE_FEATURE_CPIO_O("o") USE_FEATURE_CPIO_P("p") "dmvu] [-F FILE]" \
+ USE_FEATURE_CPIO_O( " [-H newc]" )
#define cpio_full_usage "\n\n" \
"Extract or list files from a cpio archive" \
USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \
- "\n" \
- "Main operation mode:" \
- "\n d Make leading directories" \
- "\n i Extract" \
- "\n m Preserve mtime" \
+ "\nMain operation mode:" \
+ "\n -t List" \
+ "\n -i Extract" \
USE_FEATURE_CPIO_O( \
- "\n o Create" \
- "\n H newc Define format" \
+ "\n -o Create" \
+ ) \
+ USE_FEATURE_CPIO_P( \
+ "\n -p Passthrough" \
+ ) \
+ "\nOptions:" \
+ "\n -d Make leading directories" \
+ "\n -m Preserve mtime" \
+ "\n -v Verbose" \
+ "\n -u Overwrite" \
+ "\n -F Input file" \
+ USE_FEATURE_CPIO_O( \
+ "\n -H Define format" \
) \
- "\n t List" \
- "\n v Verbose" \
- "\n u Unconditional overwrite" \
- "\n F Input from file" \
#define crond_trivial_usage \
"-fbS -l N " USE_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
@@ -1167,6 +1172,7 @@
USE_FEATURE_FIND_MAXDEPTH( \
"\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
"\n tests/actions to command line arguments only") \
+ "\n -mindepth N Do not act on first N levels" \
"\n -name PATTERN File name (w/o directory name) matches PATTERN" \
"\n -iname PATTERN Case insensitive -name" \
USE_FEATURE_FIND_PATH( \
@@ -1425,6 +1431,7 @@
"eF" \
USE_FEATURE_GREP_EGREP_ALIAS("E") \
USE_FEATURE_GREP_CONTEXT("ABC") \
+ USE_EXTRA_COMPAT("z") \
"] PATTERN [FILEs...]"
#define grep_full_usage "\n\n" \
"Search for PATTERN in each FILE or standard input\n" \
@@ -1453,6 +1460,8 @@
"\n -A Print NUM lines of trailing context" \
"\n -B Print NUM lines of leading context" \
"\n -C Print NUM lines of output context") \
+ USE_EXTRA_COMPAT( \
+ "\n -z Input is NUL terminated") \
#define grep_example_usage \
"$ grep root /etc/passwd\n" \