Merge lp:~oif-team/evemu/trunk.v1.0.4 into lp:evemu

Proposed by Henrik Rydberg
Status: Merged
Merged at revision: 25
Proposed branch: lp:~oif-team/evemu/trunk.v1.0.4
Merge into: lp:evemu
Diff against target: 268 lines (+147/-14)
10 files modified
README (+21/-0)
configure.ac (+12/-1)
src/evemu.c (+4/-0)
tools/Makefile.am (+24/-13)
tools/evemu-describe.c (+1/-0)
tools/evemu-describe.txt (+44/-0)
tools/evemu-device.c (+1/-0)
tools/evemu-device.txt (+38/-0)
tools/evemu-play.c (+1/-0)
tools/evemu-record.c (+1/-0)
To merge this branch: bzr merge lp:~oif-team/evemu/trunk.v1.0.4
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Chase Douglas (community) Approve
Review via email: mp+45224@code.launchpad.net

Description of the change

Thanks to Peter Hutterer, we now have man pages and documentation for
the evemu tools.

To post a comment you must log in.
Revision history for this message
Chase Douglas (chasedouglas) wrote :

Looks good here.

review: Approve
Revision history for this message
Stephen M. Webb (bregma) wrote :

All good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2010-09-18 17:10:11 +0000
3+++ README 2011-01-05 11:05:09 +0000
4@@ -6,6 +6,27 @@
5 http://bitmath.org/code/evemu/
6 Please send patches to: patches@bitmath.org
7
8+evemu produces two different data formats, one for the device description
9+and one for the device event data. hex data is without a 0x prefix.
10+
11+Device Description Format:
12+ N: <device name>
13+ I: <bustype (hex)> <vendor (hex)> <product (hex)> <version (hex)>
14+ # for each kernel property (2.3.38 only)
15+ P: <byte 0 (hex)> <byte 1 (hex)> ... <byte 7 (hex)>
16+ P: <byte 8 (hex)> ...
17+ # for each index from 0 to EV_CNT
18+ B: <index (hex)> <byte 0 (hex)> <byte 1 (hex)> ... <byte 7 (hex)>
19+ B: <index (hex)> <byte 8 (hex)> ...
20+ # for each absolute axis
21+ A: <index (hex)> <min> <max> <fuzz> <flat>
22+
23+
24+Event Data Format:
25+ E: <sec>.<usec> <evtype (hex)> <evcode (hex)> <ev value>
26+where type, code and value are the respective fields of the
27+input_event struct defined in linux/input.h
28+
29 ---
30 Copyright (C) 2010 Henrik Rydberg <rydberg@euromail.se>
31 Copyright (C) 2010 Canonical Ltd.
32
33=== modified file 'configure.ac'
34--- configure.ac 2010-12-22 07:47:53 +0000
35+++ configure.ac 2011-01-05 11:05:09 +0000
36@@ -1,7 +1,7 @@
37 # Initialize Autoconf
38 AC_PREREQ([2.60])
39 AC_INIT([Kernel device emulation],
40- [1.0.3],
41+ [1.0.4],
42 [],
43 [utouch-evemu])
44 AC_CONFIG_SRCDIR([Makefile.am])
45@@ -22,6 +22,17 @@
46 AC_PROG_CC
47 AC_PROG_INSTALL
48
49+# man page generation
50+AC_ARG_VAR([XMLTO], [Path to xmlto command])
51+AC_PATH_PROG([XMLTO], [xmlto])
52+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
53+AC_PATH_PROG([ASCIIDOC], [asciidoc])
54+AM_CONDITIONAL([HAVE_DOCTOOLS], [test "x$XMLTO" != "x" && test "x$ASCIIDOC" != "x"])
55+if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then
56+ AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
57+fi
58+
59+
60 AC_CONFIG_FILES([Makefile
61 src/Makefile
62 tools/Makefile
63
64=== modified file 'src/evemu.c'
65--- src/evemu.c 2010-12-22 07:22:51 +0000
66+++ src/evemu.c 2011-01-05 11:05:09 +0000
67@@ -33,6 +33,8 @@
68 #include <fcntl.h>
69 #include <errno.h>
70 #include <poll.h>
71+#include <ctype.h>
72+#include <unistd.h>
73
74 #ifndef UI_SET_PROPBIT
75 #define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int)
76@@ -239,6 +241,8 @@
77 for (i = 0; i < ABS_CNT; i++)
78 if (evemu_has_event(dev, EV_ABS, i))
79 write_abs(fp, i, &dev->abs[i]);
80+
81+ return 0;
82 }
83
84 static void read_prop(struct evemu_device *dev, FILE *fp)
85
86=== modified file 'tools/Makefile.am'
87--- tools/Makefile.am 2010-09-19 18:15:10 +0000
88+++ tools/Makefile.am 2011-01-05 11:05:09 +0000
89@@ -9,16 +9,27 @@
90
91 INCLUDES=-I$(top_srcdir)/include/
92
93-evemu_describe_SOURCES = evemu-describe.c
94-evemu_describe_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu
95-
96-evemu_echo_SOURCES = evemu-echo.c
97-evemu_echo_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu
98-
99-evemu_device_SOURCES = evemu-device.c
100-evemu_device_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu
101-
102-evemu_record_SOURCES = evemu-record.c
103-evemu_record_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu
104-evemu_play_SOURCES = evemu-play.c
105-evemu_play_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu
106+AM_LDFLAGS = $(top_builddir)/src/libutouch-evemu.la
107+
108+
109+# man page generation
110+if HAVE_DOCTOOLS
111+# actual man pages
112+man_pages_sources = evemu-describe.txt evemu-device.txt
113+# shadow man pages
114+man_pages_shadows = evemu-record.1 evemu-play.1
115+
116+man_pages = $(man_pages_sources:.txt=.1) $(man_pages_shadows)
117+
118+SUFFIXES = .1 .txt .xml
119+
120+.xml.1:
121+ @$(XMLTO) man $<
122+
123+.txt.xml:
124+ @$(ASCIIDOC) -b docbook -d manpage -o $@ $<
125+
126+dist_man_MANS = $(man_pages)
127+CLEANFILES = $(dist_man_MANS)
128+MAINTAINERCLEANFILES = $(man_pages) *.xml
129+endif
130
131=== modified file 'tools/evemu-describe.c'
132--- tools/evemu-describe.c 2010-12-21 16:50:56 +0000
133+++ tools/evemu-describe.c 2011-01-05 11:05:09 +0000
134@@ -30,6 +30,7 @@
135 #include <stdio.h>
136 #include <fcntl.h>
137 #include <string.h>
138+#include <unistd.h>
139
140 static int describe_device(int fd)
141 {
142
143=== added file 'tools/evemu-describe.txt'
144--- tools/evemu-describe.txt 1970-01-01 00:00:00 +0000
145+++ tools/evemu-describe.txt 2011-01-05 11:05:09 +0000
146@@ -0,0 +1,44 @@
147+EVEMU-DESCRIBE(1)
148+=================
149+
150+NAME
151+----
152+
153+ evemu-describe, evemu-record - print information and events from an
154+ input device
155+
156+SYNOPSIS
157+--------
158+ evemu-describe /dev/input/eventX
159+
160+ evemu-record /dev/input/eventX
161+
162+DESCRIPTION
163+-----------
164+evemu-describe gathers information about the input device and prints it to
165+stdout. This information can be parsed by evemu-device(1) to create a
166+virtual input device with the same properties.
167+
168+evemu-record captures events from the input device and prints them to
169+stdout. The events can be parsed by evemu-play(1) to let a virtual input
170+device created with evemu-device(1) emit the exact same event sequence.
171+
172+evemu-describe and evemu-record need to be able to read from the device; in
173+most cases this means they must be run as root.
174+
175+DIAGNOSTICS
176+-----------
177+If evtest-record does not see any events even though the device is being
178+used, the device may be grabbed by a process (EVIOCGRAB). This is usually
179+the case when debugging a synaptics or wacom device from within X. VT
180+switching to a TTY or shutting down the X server terminates this grab and
181+the devices can be recorded.
182+
183+SEE ALSO
184+--------
185+evemu-device(1)
186+evemu-play(1)
187+
188+AUTHOR
189+------
190+evemu was written by Henrik Rydberg <rydberg@euromail.se>
191
192=== modified file 'tools/evemu-device.c'
193--- tools/evemu-device.c 2010-12-21 16:50:56 +0000
194+++ tools/evemu-device.c 2011-01-05 11:05:09 +0000
195@@ -30,6 +30,7 @@
196 #include <stdio.h>
197 #include <fcntl.h>
198 #include <string.h>
199+#include <unistd.h>
200
201 #define UINPUT_NODE "/dev/uinput"
202 #define MAX_EVENT_NODE 32
203
204=== added file 'tools/evemu-device.txt'
205--- tools/evemu-device.txt 1970-01-01 00:00:00 +0000
206+++ tools/evemu-device.txt 2011-01-05 11:05:09 +0000
207@@ -0,0 +1,38 @@
208+EVEMU-DEVICE(1)
209+===============
210+
211+NAME
212+----
213+
214+ evemu-device, evemu-play - create a virtual input device and replay an
215+ event sequence
216+
217+SYNOPSIS
218+--------
219+ evemu-device [description-file]
220+
221+ evemu-play /dev/input/eventX < event-sequence
222+
223+DESCRIPTION
224+-----------
225+evemu-device creates a virtual input device based on the description-file.
226+This description is usually created by evemu-describe(1). evemu-device then
227+creates a new input device with uinput and prints the name and the device
228+file to
229+stdout.
230+
231+evemu-play replays the event sequence given on stdin through the input
232+device. The event sequence must be in the form created by evemu-record(1).
233+
234+evemu-device must be able to write to the uinput device node, and evemu-play
235+must be able to write to the device node specified; in most cases this means
236+it must be run as root.
237+
238+SEE ALSO
239+--------
240+evemu-describe(1)
241+evemu-record(1)
242+
243+AUTHOR
244+------
245+evemu was written by Henrik Rydberg <rydberg@euromail.se>
246
247=== modified file 'tools/evemu-play.c'
248--- tools/evemu-play.c 2010-09-22 15:14:42 +0000
249+++ tools/evemu-play.c 2011-01-05 11:05:09 +0000
250@@ -30,6 +30,7 @@
251 #include <stdio.h>
252 #include <fcntl.h>
253 #include <string.h>
254+#include <unistd.h>
255
256 int main(int argc, char *argv[])
257 {
258
259=== modified file 'tools/evemu-record.c'
260--- tools/evemu-record.c 2010-09-18 17:10:11 +0000
261+++ tools/evemu-record.c 2011-01-05 11:05:09 +0000
262@@ -30,6 +30,7 @@
263 #include <stdio.h>
264 #include <fcntl.h>
265 #include <string.h>
266+#include <unistd.h>
267
268 #define WAIT_MS 10000
269

Subscribers

People subscribed via source and target branches

to all changes: