summaryrefslogtreecommitdiff
path: root/include/usage.h
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-10-06 15:37:02 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-10-06 15:37:02 +0000
commit81c3a518d3121ac6a9fc991aabb916be95ebdea2 (patch)
treea74704314c1dcffbd472702e265966678a986a7c /include/usage.h
parentb31cb87fdce95d4bde2062e44e7a5408e97985c6 (diff)
downloadbusybox-w32-81c3a518d3121ac6a9fc991aabb916be95ebdea2.tar.gz
busybox-w32-81c3a518d3121ac6a9fc991aabb916be95ebdea2.tar.bz2
busybox-w32-81c3a518d3121ac6a9fc991aabb916be95ebdea2.zip
- pidof(8): make -s optional and optional -o; closes #168
first cut.
Diffstat (limited to 'include/usage.h')
-rw-r--r--include/usage.h27
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"