[PATCH evemu 4/7] tools: ensure --value is passed to evemu-event

Peter Hutterer peter.hutterer at who-t.net
Tue Aug 18 18:03:27 PDT 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 tools/evemu-event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/evemu-event.c b/tools/evemu-event.c
index d30e82e..0ee4c8e 100644
--- a/tools/evemu-event.c
+++ b/tools/evemu-event.c
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 {
 	int rc = -1;
 	int fd = -1;
-	long int type, code, value;
+	long int type, code, value = LONG_MAX;
 	struct input_event ev;
 	int sync = 0;
 	const char *path = NULL;
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	if (!type_arg || !code_arg) {
+	if (!type_arg || !code_arg || value == LONG_MAX) {
 		usage();
 		goto out;
 	}
-- 
2.4.3



More information about the Input-tools mailing list