aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
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 8ea493b18..a2042fe5c 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 **
797 * Both of the above will redirect fd 0,1,2 to /dev/null and drop ctty 797 * Both of the above will redirect fd 0,1,2 to /dev/null and drop ctty
798 * (will do setsid()). 798 * (will do setsid()).
799 * 799 *
800 * forkexit_or_rexec(argv) = bare-bones "fork + parent exits" on MMU, 800 * fork_or_rexec(argv) = bare-bones "fork" on MMU,
801 * "vfork + re-exec ourself" on NOMMU. No fd redirection, no setsid(). 801 * "vfork + re-exec ourself" on NOMMU. No fd redirection, no setsid().
802 * Currently used for setsid only. On MMU ignores argv. 802 * On MMU ignores argv.
803 * 803 *
804 * Helper for network daemons in foreground mode: 804 * Helper for network daemons in foreground mode:
805 * 805 *
@@ -813,14 +813,14 @@ enum {
813 DAEMON_ONLY_SANITIZE = 8, /* internal use */ 813 DAEMON_ONLY_SANITIZE = 8, /* internal use */
814}; 814};
815#if BB_MMU 815#if BB_MMU
816 void forkexit_or_rexec(void) FAST_FUNC; 816 pid_t fork_or_rexec(void) FAST_FUNC;
817 enum { re_execed = 0 }; 817 enum { re_execed = 0 };
818# define forkexit_or_rexec(argv) forkexit_or_rexec() 818# define fork_or_rexec(argv) fork_or_rexec()
819# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) 819# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags)
820# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) 820# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus)
821#else 821#else
822 void re_exec(char **argv) NORETURN FAST_FUNC; 822 void re_exec(char **argv) NORETURN FAST_FUNC;
823 void forkexit_or_rexec(char **argv) FAST_FUNC; 823 pid_t fork_or_rexec(char **argv) FAST_FUNC;
824 extern bool re_execed; 824 extern bool re_execed;
825 int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; 825 int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC;
826 int BUG_daemon_is_unavailable_on_nommu(void) FAST_FUNC; 826 int BUG_daemon_is_unavailable_on_nommu(void) FAST_FUNC;
diff --git a/include/usage.h b/include/usage.h
index e78754315..2b5d34ea6 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -531,24 +531,29 @@
531 "\n -l,-s Create (sym)links" \ 531 "\n -l,-s Create (sym)links" \
532 532
533#define cpio_trivial_usage \ 533#define cpio_trivial_usage \
534 "-[dim" USE_FEATURE_CPIO_O("o") "tuv][F cpiofile]" \ 534 "-[ti" USE_FEATURE_CPIO_O("o") USE_FEATURE_CPIO_P("p") "dmvu] [-F FILE]" \
535 USE_FEATURE_CPIO_O( "[H newc]" ) 535 USE_FEATURE_CPIO_O( " [-H newc]" )
536#define cpio_full_usage "\n\n" \ 536#define cpio_full_usage "\n\n" \
537 "Extract or list files from a cpio archive" \ 537 "Extract or list files from a cpio archive" \
538 USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \ 538 USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \
539 "\n" \ 539 "\nMain operation mode:" \
540 "Main operation mode:" \ 540 "\n -t List" \
541 "\n d Make leading directories" \ 541 "\n -i Extract" \
542 "\n i Extract" \
543 "\n m Preserve mtime" \
544 USE_FEATURE_CPIO_O( \ 542 USE_FEATURE_CPIO_O( \
545 "\n o Create" \ 543 "\n -o Create" \
546 "\n H newc Define format" \ 544 ) \
545 USE_FEATURE_CPIO_P( \
546 "\n -p Passthrough" \
547 ) \
548 "\nOptions:" \
549 "\n -d Make leading directories" \
550 "\n -m Preserve mtime" \
551 "\n -v Verbose" \
552 "\n -u Overwrite" \
553 "\n -F Input file" \
554 USE_FEATURE_CPIO_O( \
555 "\n -H Define format" \
547 ) \ 556 ) \
548 "\n t List" \
549 "\n v Verbose" \
550 "\n u Unconditional overwrite" \
551 "\n F Input from file" \
552 557
553#define crond_trivial_usage \ 558#define crond_trivial_usage \
554 "-fbS -l N " USE_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" 559 "-fbS -l N " USE_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
@@ -1167,6 +1172,7 @@
1167 USE_FEATURE_FIND_MAXDEPTH( \ 1172 USE_FEATURE_FIND_MAXDEPTH( \
1168 "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \ 1173 "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
1169 "\n tests/actions to command line arguments only") \ 1174 "\n tests/actions to command line arguments only") \
1175 "\n -mindepth N Do not act on first N levels" \
1170 "\n -name PATTERN File name (w/o directory name) matches PATTERN" \ 1176 "\n -name PATTERN File name (w/o directory name) matches PATTERN" \
1171 "\n -iname PATTERN Case insensitive -name" \ 1177 "\n -iname PATTERN Case insensitive -name" \
1172 USE_FEATURE_FIND_PATH( \ 1178 USE_FEATURE_FIND_PATH( \
@@ -1425,6 +1431,7 @@
1425 "eF" \ 1431 "eF" \
1426 USE_FEATURE_GREP_EGREP_ALIAS("E") \ 1432 USE_FEATURE_GREP_EGREP_ALIAS("E") \
1427 USE_FEATURE_GREP_CONTEXT("ABC") \ 1433 USE_FEATURE_GREP_CONTEXT("ABC") \
1434 USE_EXTRA_COMPAT("z") \
1428 "] PATTERN [FILEs...]" 1435 "] PATTERN [FILEs...]"
1429#define grep_full_usage "\n\n" \ 1436#define grep_full_usage "\n\n" \
1430 "Search for PATTERN in each FILE or standard input\n" \ 1437 "Search for PATTERN in each FILE or standard input\n" \
@@ -1453,6 +1460,8 @@
1453 "\n -A Print NUM lines of trailing context" \ 1460 "\n -A Print NUM lines of trailing context" \
1454 "\n -B Print NUM lines of leading context" \ 1461 "\n -B Print NUM lines of leading context" \
1455 "\n -C Print NUM lines of output context") \ 1462 "\n -C Print NUM lines of output context") \
1463 USE_EXTRA_COMPAT( \
1464 "\n -z Input is NUL terminated") \
1456 1465
1457#define grep_example_usage \ 1466#define grep_example_usage \
1458 "$ grep root /etc/passwd\n" \ 1467 "$ grep root /etc/passwd\n" \