[PATCH xinput 1/1] Print usage when run with --help

Jeremy Huddleston jeremyhu at apple.com
Tue Nov 29 23:52:53 PST 2011


Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
 src/xinput.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/xinput.c b/src/xinput.c
index 27fb23e..2d9a893 100644
--- a/src/xinput.c
+++ b/src/xinput.c
@@ -357,6 +357,11 @@ main(int argc, char * argv[])
         return print_version(argv[0]);
     }
 
+    if (strcmp("help", func) == 0) {
+        usage();
+        return 0;
+    }
+
     display = XOpenDisplay(NULL);
 
     if (display == NULL) {
-- 
1.7.7



More information about the xorg-devel mailing list