diff options
| author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-10-06 15:37:02 +0000 |
|---|---|---|
| committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-10-06 15:37:02 +0000 |
| commit | 40235c8154a53a749956b46b44b760e6ae0e15fa (patch) | |
| tree | a74704314c1dcffbd472702e265966678a986a7c /include | |
| parent | 18c5544ad99fde3af59ac8b4ca690cf27c952d2b (diff) | |
| download | busybox-w32-40235c8154a53a749956b46b44b760e6ae0e15fa.tar.gz busybox-w32-40235c8154a53a749956b46b44b760e6ae0e15fa.tar.bz2 busybox-w32-40235c8154a53a749956b46b44b760e6ae0e15fa.zip | |
- pidof(8): make -s optional and optional -o; closes #168
first cut.
git-svn-id: svn://busybox.net/trunk/busybox@11793 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include')
| -rw-r--r-- | include/usage.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/usage.h b/include/usage.h index fad50efdc..bef6a4dd2 100644 --- a/include/usage.h +++ b/include/usage.h | |||
| @@ -2160,16 +2160,37 @@ | |||
| 2160 | "$ patch -p1 <example.diff\n" \ | 2160 | "$ patch -p1 <example.diff\n" \ |
| 2161 | "$ patch -p0 -i example.diff" | 2161 | "$ patch -p0 -i example.diff" |
| 2162 | 2162 | ||
| 2163 | #if ENABLE_FEATURE_PIDOF_SINGLE | ||
| 2164 | #define USAGE_FEATURE_PIDOF_SINGLE(a) a | ||
| 2165 | #else | ||
| 2166 | #define USAGE_FEATURE_PIDOF_SINGLE(a) | ||
| 2167 | #endif | ||
| 2168 | #if ENABLE_FEATURE_PIDOF_OMIT | ||
| 2169 | #define USAGE_FEATURE_PIDOF_OMIT(a) a | ||
| 2170 | #else | ||
| 2171 | #define USAGE_FEATURE_PIDOF_OMIT(a) | ||
| 2172 | #endif | ||
| 2173 | #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) | ||
| 2174 | #define USAGE_PIDOF "Options:" | ||
| 2175 | #else | ||
| 2176 | #define USAGE_PIDOF "\n\tThis version of pidof accepts no options." | ||
| 2177 | #endif | ||
| 2178 | |||
| 2163 | #define pidof_trivial_usage \ | 2179 | #define pidof_trivial_usage \ |
| 2164 | "process-name [OPTION] [process-name ...]" | 2180 | "process-name [OPTION] [process-name ...]" |
| 2181 | |||
| 2165 | #define pidof_full_usage \ | 2182 | #define pidof_full_usage \ |
| 2166 | "Lists the PIDs of all processes with names that match the\n" \ | 2183 | "Lists the PIDs of all processes with names that match the\n" \ |
| 2167 | "names on the command line.\n" \ | 2184 | "names on the command line.\n" \ |
| 2168 | "Options:\n" \ | 2185 | USAGE_PIDOF \ |
| 2169 | "\t-s\t\tdisplay only a single PID" | 2186 | USAGE_FEATURE_PIDOF_SINGLE("\n\t-s\t\tdisplay only a single PID") \ |
| 2187 | USAGE_FEATURE_PIDOF_OMIT("\n\t-o\t\tomit given pid.") \ | ||
| 2188 | USAGE_FEATURE_PIDOF_OMIT("\n\t\t\tUse %PPID to omit the parent pid of pidof itself") | ||
| 2170 | #define pidof_example_usage \ | 2189 | #define pidof_example_usage \ |
| 2171 | "$ pidof init\n" \ | 2190 | "$ pidof init\n" \ |
| 2172 | "1\n" | 2191 | "1\n" \ |
| 2192 | USAGE_FEATURE_PIDOF_OMIT("$ pidof /bin/sh\n20351 5973 5950\n") \ | ||
| 2193 | USAGE_FEATURE_PIDOF_OMIT("$ pidof /bin/sh -o %PPID\n20351 5950") | ||
| 2173 | 2194 | ||
| 2174 | #ifndef CONFIG_FEATURE_FANCY_PING | 2195 | #ifndef CONFIG_FEATURE_FANCY_PING |
| 2175 | #define ping_trivial_usage "host" | 2196 | #define ping_trivial_usage "host" |
