summaryrefslogtreecommitdiff
path: root/procps/pidof.c
diff options
context:
space:
mode:
authorPere Orga2011-04-11 03:29:49 +0200
committerDenys Vlasenko2011-04-11 03:29:49 +0200
commit5bc8c005a8e15c43285bc595a8d404de67a482ac (patch)
tree98f2d35d1db26f4d8cba5f095ff63bf8e2e8d980 /procps/pidof.c
parent73ef15cf3894716c1393ed21dee6e6bb2cdbc90f (diff)
downloadbusybox-5bc8c005a8e15c43285bc595a8d404de67a482ac.zip
busybox-5bc8c005a8e15c43285bc595a8d404de67a482ac.tar.gz
move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/pidof.c')
-rw-r--r--procps/pidof.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/procps/pidof.c b/procps/pidof.c
index 49e469c..e102a31 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -7,6 +7,34 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
+//usage:#define pidof_trivial_usage
+//usage: "[OPTIONS] [NAME]..."
+//usage:#define USAGE_PIDOF "\n\nOptions:"
+//usage:#else
+//usage:#define pidof_trivial_usage
+//usage: "[NAME]..."
+//usage:#define USAGE_PIDOF /* none */
+//usage:#endif
+//usage:#define pidof_full_usage "\n\n"
+//usage: "List PIDs of all processes with names that match NAMEs"
+//usage: USAGE_PIDOF
+//usage: IF_FEATURE_PIDOF_SINGLE(
+//usage: "\n -s Show only one PID"
+//usage: )
+//usage: IF_FEATURE_PIDOF_OMIT(
+//usage: "\n -o PID Omit given pid"
+//usage: "\n Use %PPID to omit pid of pidof's parent"
+//usage: )
+//usage:
+//usage:#define pidof_example_usage
+//usage: "$ pidof init\n"
+//usage: "1\n"
+//usage: IF_FEATURE_PIDOF_OMIT(
+//usage: "$ pidof /bin/sh\n20351 5973 5950\n")
+//usage: IF_FEATURE_PIDOF_OMIT(
+//usage: "$ pidof /bin/sh -o %PPID\n20351 5950")
+
#include "libbb.h"
enum {