[PATCH evemu 1/3] evemu-record: move describe_device into each mode
Peter Hutterer
peter.hutterer at who-t.net
Fri Feb 26 02:52:59 UTC 2016
This doesn't make sense just yet, it's prep work for an upcoming patch to call
describe_device multiple times in the evemu-record case.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
tools/evemu-record.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/evemu-record.c b/tools/evemu-record.c
index 1a81767..bedb659 100644
--- a/tools/evemu-record.c
+++ b/tools/evemu-record.c
@@ -164,11 +164,21 @@ int main(int argc, char *argv[])
if (!test_grab_device(fd))
goto out;
+ if (describe_device(output, fd)) {
+ fprintf(stderr, "error: could not describe device\n");
+ goto out;
+ }
+
fprintf(output, "################################\n");
fprintf(output, "# Waiting for events #\n");
fprintf(output, "################################\n");
if (evemu_record(output, fd, INFINITE))
fprintf(stderr, "error: could not record device\n");
+ } else if (mode == EVEMU_DESCRIBE) {
+ if (describe_device(output, fd)) {
+ fprintf(stderr, "error: could not describe device\n");
+ goto out;
+ }
}
rc = 0;
--
2.5.0
More information about the Input-tools
mailing list