diff options
author | Pere Orga <gotrunks@gmail.com> | 2011-04-01 22:56:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-03 01:33:55 +0200 |
commit | 6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch) | |
tree | b7d40d6e0c6042f0d102101ff7b5784d2f0536ba /debianutils | |
parent | fa9126e68904b16aee2a0fc47688ffe17403152a (diff) | |
download | busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.bz2 busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.zip |
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/pipe_progress.c | 4 | ||||
-rw-r--r-- | debianutils/run_parts.c | 26 | ||||
-rw-r--r-- | debianutils/start_stop_daemon.c | 63 | ||||
-rw-r--r-- | debianutils/which.c | 9 |
4 files changed, 102 insertions, 0 deletions
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index 1e57dc241..2c7444f31 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c | |||
@@ -6,6 +6,10 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define pipe_progress_trivial_usage NOUSAGE_STR | ||
11 | //usage:#define pipe_progress_full_usage "" | ||
12 | |||
9 | #include "libbb.h" | 13 | #include "libbb.h" |
10 | 14 | ||
11 | #define PIPE_PROGRESS_SIZE 4096 | 15 | #define PIPE_PROGRESS_SIZE 4096 |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index b93a5a917..0c2302696 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -30,6 +30,32 @@ | |||
30 | * -u MASK umask. Set the umask of the program executed to MASK. | 30 | * -u MASK umask. Set the umask of the program executed to MASK. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | //usage:#define run_parts_trivial_usage | ||
34 | //usage: "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY" | ||
35 | //usage:#define run_parts_full_usage "\n\n" | ||
36 | //usage: "Run a bunch of scripts in DIRECTORY\n" | ||
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -t Print what would be run, but don't actually run anything" | ||
39 | //usage: "\n -a ARG Pass ARG as argument for every program" | ||
40 | //usage: "\n -u MASK Set the umask to MASK before running every program" | ||
41 | //usage: IF_FEATURE_RUN_PARTS_FANCY( | ||
42 | //usage: "\n -l Print names of all matching files even if they are not executable" | ||
43 | //usage: ) | ||
44 | //usage: | ||
45 | //usage:#define run_parts_example_usage | ||
46 | //usage: "$ run-parts -a start /etc/init.d\n" | ||
47 | //usage: "$ run-parts -a stop=now /etc/init.d\n\n" | ||
48 | //usage: "Let's assume you have a script foo/dosomething:\n" | ||
49 | //usage: "#!/bin/sh\n" | ||
50 | //usage: "for i in $*; do eval $i; done; unset i\n" | ||
51 | //usage: "case \"$1\" in\n" | ||
52 | //usage: "start*) echo starting something;;\n" | ||
53 | //usage: "stop*) set -x; shutdown -h $stop;;\n" | ||
54 | //usage: "esac\n\n" | ||
55 | //usage: "Running this yields:\n" | ||
56 | //usage: "$run-parts -a stop=+4m foo/\n" | ||
57 | //usage: "+ shutdown -h +4m" | ||
58 | |||
33 | #include "libbb.h" | 59 | #include "libbb.h" |
34 | 60 | ||
35 | struct globals { | 61 | struct globals { |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index d2ee95068..30dd9709d 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -56,6 +56,69 @@ Misc options: | |||
56 | -v,--verbose Verbose | 56 | -v,--verbose Verbose |
57 | */ | 57 | */ |
58 | 58 | ||
59 | //usage:#define start_stop_daemon_trivial_usage | ||
60 | //usage: "[OPTIONS] [-S|-K] ... [-- ARGS...]" | ||
61 | //usage:#define start_stop_daemon_full_usage "\n\n" | ||
62 | //usage: "Search for matching processes, and then\n" | ||
63 | //usage: "-K: stop all matching processes.\n" | ||
64 | //usage: "-S: start a process unless a matching process is found.\n" | ||
65 | //usage: IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( | ||
66 | //usage: "\nProcess matching:" | ||
67 | //usage: "\n -u,--user USERNAME|UID Match only this user's processes" | ||
68 | //usage: "\n -n,--name NAME Match processes with NAME" | ||
69 | //usage: "\n in comm field in /proc/PID/stat" | ||
70 | //usage: "\n -x,--exec EXECUTABLE Match processes with this command" | ||
71 | //usage: "\n in /proc/PID/cmdline" | ||
72 | //usage: "\n -p,--pidfile FILE Match a process with PID from the file" | ||
73 | //usage: "\n All specified conditions must match" | ||
74 | //usage: "\n-S only:" | ||
75 | //usage: "\n -x,--exec EXECUTABLE Program to run" | ||
76 | //usage: "\n -a,--startas NAME Zeroth argument" | ||
77 | //usage: "\n -b,--background Background" | ||
78 | //usage: IF_FEATURE_START_STOP_DAEMON_FANCY( | ||
79 | //usage: "\n -N,--nicelevel N Change nice level" | ||
80 | //usage: ) | ||
81 | //usage: "\n -c,--chuid USER[:[GRP]] Change to user/group" | ||
82 | //usage: "\n -m,--make-pidfile Write PID to the pidfile specified by -p" | ||
83 | //usage: "\n-K only:" | ||
84 | //usage: "\n -s,--signal SIG Signal to send" | ||
85 | //usage: "\n -t,--test Match only, exit with 0 if a process is found" | ||
86 | //usage: "\nOther:" | ||
87 | //usage: IF_FEATURE_START_STOP_DAEMON_FANCY( | ||
88 | //usage: "\n -o,--oknodo Exit with status 0 if nothing is done" | ||
89 | //usage: "\n -v,--verbose Verbose" | ||
90 | //usage: ) | ||
91 | //usage: "\n -q,--quiet Quiet" | ||
92 | //usage: ) | ||
93 | //usage: IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( | ||
94 | //usage: "\nProcess matching:" | ||
95 | //usage: "\n -u USERNAME|UID Match only this user's processes" | ||
96 | //usage: "\n -n NAME Match processes with NAME" | ||
97 | //usage: "\n in comm field in /proc/PID/stat" | ||
98 | //usage: "\n -x EXECUTABLE Match processes with this command" | ||
99 | //usage: "\n command in /proc/PID/cmdline" | ||
100 | //usage: "\n -p FILE Match a process with PID from the file" | ||
101 | //usage: "\n All specified conditions must match" | ||
102 | //usage: "\n-S only:" | ||
103 | //usage: "\n -x EXECUTABLE Program to run" | ||
104 | //usage: "\n -a NAME Zeroth argument" | ||
105 | //usage: "\n -b Background" | ||
106 | //usage: IF_FEATURE_START_STOP_DAEMON_FANCY( | ||
107 | //usage: "\n -N N Change nice level" | ||
108 | //usage: ) | ||
109 | //usage: "\n -c USER[:[GRP]] Change to user/group" | ||
110 | //usage: "\n -m Write PID to the pidfile specified by -p" | ||
111 | //usage: "\n-K only:" | ||
112 | //usage: "\n -s SIG Signal to send" | ||
113 | //usage: "\n -t Match only, exit with 0 if a process is found" | ||
114 | //usage: "\nOther:" | ||
115 | //usage: IF_FEATURE_START_STOP_DAEMON_FANCY( | ||
116 | //usage: "\n -o Exit with status 0 if nothing is done" | ||
117 | //usage: "\n -v Verbose" | ||
118 | //usage: ) | ||
119 | //usage: "\n -q Quiet" | ||
120 | //usage: ) | ||
121 | |||
59 | #include <sys/resource.h> | 122 | #include <sys/resource.h> |
60 | 123 | ||
61 | /* Override ENABLE_FEATURE_PIDFILE */ | 124 | /* Override ENABLE_FEATURE_PIDFILE */ |
diff --git a/debianutils/which.c b/debianutils/which.c index a82641909..15fd598b7 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -10,6 +10,15 @@ | |||
10 | * Based on which from debianutils | 10 | * Based on which from debianutils |
11 | */ | 11 | */ |
12 | 12 | ||
13 | //usage:#define which_trivial_usage | ||
14 | //usage: "[COMMAND]..." | ||
15 | //usage:#define which_full_usage "\n\n" | ||
16 | //usage: "Locate a COMMAND" | ||
17 | //usage: | ||
18 | //usage:#define which_example_usage | ||
19 | //usage: "$ which login\n" | ||
20 | //usage: "/bin/login\n" | ||
21 | |||
13 | #include "libbb.h" | 22 | #include "libbb.h" |
14 | 23 | ||
15 | int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 24 | int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |