summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-11-02 11:19:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-12-14 15:19:22 +1000
commitf545cfa9235052eef8d48cde19bafb2cca7fccb9 (patch)
treed7962db64dc9444608a4f2f12e2bca4577402c4b /tools
parent8540efc209d618beaea3e85b78ceedde9da5a66a (diff)
tools: support --help in the ptraccel-debug tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/ptraccel-debug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/ptraccel-debug.c b/tools/ptraccel-debug.c
index a5b9a09..53d34ff 100644
--- a/tools/ptraccel-debug.c
+++ b/tools/ptraccel-debug.c
@@ -203,7 +203,8 @@ main(int argc, char **argv)
accel_profile_func_t profile = NULL;
enum {
- OPT_MODE = 1,
+ OPT_HELP = 1,
+ OPT_MODE,
OPT_NEVENTS,
OPT_MAXDX,
OPT_STEP,
@@ -216,6 +217,7 @@ main(int argc, char **argv)
int c;
int option_index = 0;
static struct option long_options[] = {
+ {"help", 0, 0, OPT_HELP },
{"mode", 1, 0, OPT_MODE },
{"nevents", 1, 0, OPT_NEVENTS },
{"maxdx", 1, 0, OPT_MAXDX },
@@ -232,6 +234,10 @@ main(int argc, char **argv)
break;
switch (c) {
+ case OPT_HELP:
+ usage();
+ exit(0);
+ break;
case OPT_MODE:
if (streq(optarg, "accel"))
print_accel = true;