[PATCH evemu] tools: evemu-record's output file must record the description too

Peter Hutterer peter.hutterer at who-t.net
Sun Nov 1 23:58:45 PST 2015


argv[2] specifies the output file to record to (stdout by default).
  evemu-record /dev/input/event0 somefile
This recording was missing the device description tough.

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

diff --git a/tools/evemu-record.c b/tools/evemu-record.c
index c2293ab..305bfe5 100644
--- a/tools/evemu-record.c
+++ b/tools/evemu-record.c
@@ -55,7 +55,7 @@
 
 FILE *output;
 
-static int describe_device(int fd)
+static int describe_device(FILE *output, int fd)
 {
 	struct evemu_device *dev;
 	int ret = -ENOMEM;
@@ -67,7 +67,7 @@ static int describe_device(int fd)
 	if (ret)
 		goto out;
 
-	evemu_write(dev, stdout);
+	evemu_write(dev, output);
 out:
 	evemu_delete(dev);
 	return ret;
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	if (describe_device(fd)) {
+	if (describe_device(output, fd)) {
 		fprintf(stderr, "error: could not describe device\n");
 		goto out;
 	}
-- 
2.4.3



More information about the Input-tools mailing list