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
=== modified file 'README'
--- README 2010-09-18 17:10:11 +0000
+++ README 2011-01-05 11:05:09 +0000
@@ -6,6 +6,27 @@
6http://bitmath.org/code/evemu/6http://bitmath.org/code/evemu/
7Please send patches to: patches@bitmath.org7Please send patches to: patches@bitmath.org
88
9evemu produces two different data formats, one for the device description
10and one for the device event data. hex data is without a 0x prefix.
11
12Device Description Format:
13 N: <device name>
14 I: <bustype (hex)> <vendor (hex)> <product (hex)> <version (hex)>
15 # for each kernel property (2.3.38 only)
16 P: <byte 0 (hex)> <byte 1 (hex)> ... <byte 7 (hex)>
17 P: <byte 8 (hex)> ...
18 # for each index from 0 to EV_CNT
19 B: <index (hex)> <byte 0 (hex)> <byte 1 (hex)> ... <byte 7 (hex)>
20 B: <index (hex)> <byte 8 (hex)> ...
21 # for each absolute axis
22 A: <index (hex)> <min> <max> <fuzz> <flat>
23
24
25Event Data Format:
26 E: <sec>.<usec> <evtype (hex)> <evcode (hex)> <ev value>
27where type, code and value are the respective fields of the
28input_event struct defined in linux/input.h
29
9---30---
10Copyright (C) 2010 Henrik Rydberg <rydberg@euromail.se>31Copyright (C) 2010 Henrik Rydberg <rydberg@euromail.se>
11Copyright (C) 2010 Canonical Ltd.32Copyright (C) 2010 Canonical Ltd.
1233
=== modified file 'configure.ac'
--- configure.ac 2010-12-22 07:47:53 +0000
+++ configure.ac 2011-01-05 11:05:09 +0000
@@ -1,7 +1,7 @@
1# Initialize Autoconf1# Initialize Autoconf
2AC_PREREQ([2.60])2AC_PREREQ([2.60])
3AC_INIT([Kernel device emulation],3AC_INIT([Kernel device emulation],
4 [1.0.3],4 [1.0.4],
5 [],5 [],
6 [utouch-evemu])6 [utouch-evemu])
7AC_CONFIG_SRCDIR([Makefile.am])7AC_CONFIG_SRCDIR([Makefile.am])
@@ -22,6 +22,17 @@
22AC_PROG_CC22AC_PROG_CC
23AC_PROG_INSTALL23AC_PROG_INSTALL
2424
25# man page generation
26AC_ARG_VAR([XMLTO], [Path to xmlto command])
27AC_PATH_PROG([XMLTO], [xmlto])
28AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
29AC_PATH_PROG([ASCIIDOC], [asciidoc])
30AM_CONDITIONAL([HAVE_DOCTOOLS], [test "x$XMLTO" != "x" && test "x$ASCIIDOC" != "x"])
31if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then
32 AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
33fi
34
35
25AC_CONFIG_FILES([Makefile36AC_CONFIG_FILES([Makefile
26 src/Makefile37 src/Makefile
27 tools/Makefile38 tools/Makefile
2839
=== modified file 'src/evemu.c'
--- src/evemu.c 2010-12-22 07:22:51 +0000
+++ src/evemu.c 2011-01-05 11:05:09 +0000
@@ -33,6 +33,8 @@
33#include <fcntl.h>33#include <fcntl.h>
34#include <errno.h>34#include <errno.h>
35#include <poll.h>35#include <poll.h>
36#include <ctype.h>
37#include <unistd.h>
3638
37#ifndef UI_SET_PROPBIT39#ifndef UI_SET_PROPBIT
38#define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int)40#define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int)
@@ -239,6 +241,8 @@
239 for (i = 0; i < ABS_CNT; i++)241 for (i = 0; i < ABS_CNT; i++)
240 if (evemu_has_event(dev, EV_ABS, i))242 if (evemu_has_event(dev, EV_ABS, i))
241 write_abs(fp, i, &dev->abs[i]);243 write_abs(fp, i, &dev->abs[i]);
244
245 return 0;
242}246}
243247
244static void read_prop(struct evemu_device *dev, FILE *fp)248static void read_prop(struct evemu_device *dev, FILE *fp)
245249
=== modified file 'tools/Makefile.am'
--- tools/Makefile.am 2010-09-19 18:15:10 +0000
+++ tools/Makefile.am 2011-01-05 11:05:09 +0000
@@ -9,16 +9,27 @@
99
10INCLUDES=-I$(top_srcdir)/include/10INCLUDES=-I$(top_srcdir)/include/
1111
12evemu_describe_SOURCES = evemu-describe.c12AM_LDFLAGS = $(top_builddir)/src/libutouch-evemu.la
13evemu_describe_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu13
1414
15evemu_echo_SOURCES = evemu-echo.c15# man page generation
16evemu_echo_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu16if HAVE_DOCTOOLS
1717# actual man pages
18evemu_device_SOURCES = evemu-device.c18man_pages_sources = evemu-describe.txt evemu-device.txt
19evemu_device_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu19# shadow man pages
2020man_pages_shadows = evemu-record.1 evemu-play.1
21evemu_record_SOURCES = evemu-record.c21
22evemu_record_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu22man_pages = $(man_pages_sources:.txt=.1) $(man_pages_shadows)
23evemu_play_SOURCES = evemu-play.c23
24evemu_play_LDFLAGS = -L$(top_builddir)/src/.libs/ -lutouch-evemu24SUFFIXES = .1 .txt .xml
25
26.xml.1:
27 @$(XMLTO) man $<
28
29.txt.xml:
30 @$(ASCIIDOC) -b docbook -d manpage -o $@ $<
31
32dist_man_MANS = $(man_pages)
33CLEANFILES = $(dist_man_MANS)
34MAINTAINERCLEANFILES = $(man_pages) *.xml
35endif
2536
=== modified file 'tools/evemu-describe.c'
--- tools/evemu-describe.c 2010-12-21 16:50:56 +0000
+++ tools/evemu-describe.c 2011-01-05 11:05:09 +0000
@@ -30,6 +30,7 @@
30#include <stdio.h>30#include <stdio.h>
31#include <fcntl.h>31#include <fcntl.h>
32#include <string.h>32#include <string.h>
33#include <unistd.h>
3334
34static int describe_device(int fd)35static int describe_device(int fd)
35{36{
3637
=== added file 'tools/evemu-describe.txt'
--- tools/evemu-describe.txt 1970-01-01 00:00:00 +0000
+++ tools/evemu-describe.txt 2011-01-05 11:05:09 +0000
@@ -0,0 +1,44 @@
1EVEMU-DESCRIBE(1)
2=================
3
4NAME
5----
6
7 evemu-describe, evemu-record - print information and events from an
8 input device
9
10SYNOPSIS
11--------
12 evemu-describe /dev/input/eventX
13
14 evemu-record /dev/input/eventX
15
16DESCRIPTION
17-----------
18evemu-describe gathers information about the input device and prints it to
19stdout. This information can be parsed by evemu-device(1) to create a
20virtual input device with the same properties.
21
22evemu-record captures events from the input device and prints them to
23stdout. The events can be parsed by evemu-play(1) to let a virtual input
24device created with evemu-device(1) emit the exact same event sequence.
25
26evemu-describe and evemu-record need to be able to read from the device; in
27most cases this means they must be run as root.
28
29DIAGNOSTICS
30-----------
31If evtest-record does not see any events even though the device is being
32used, the device may be grabbed by a process (EVIOCGRAB). This is usually
33the case when debugging a synaptics or wacom device from within X. VT
34switching to a TTY or shutting down the X server terminates this grab and
35the devices can be recorded.
36
37SEE ALSO
38--------
39evemu-device(1)
40evemu-play(1)
41
42AUTHOR
43------
44evemu was written by Henrik Rydberg <rydberg@euromail.se>
045
=== modified file 'tools/evemu-device.c'
--- tools/evemu-device.c 2010-12-21 16:50:56 +0000
+++ tools/evemu-device.c 2011-01-05 11:05:09 +0000
@@ -30,6 +30,7 @@
30#include <stdio.h>30#include <stdio.h>
31#include <fcntl.h>31#include <fcntl.h>
32#include <string.h>32#include <string.h>
33#include <unistd.h>
3334
34#define UINPUT_NODE "/dev/uinput"35#define UINPUT_NODE "/dev/uinput"
35#define MAX_EVENT_NODE 3236#define MAX_EVENT_NODE 32
3637
=== added file 'tools/evemu-device.txt'
--- tools/evemu-device.txt 1970-01-01 00:00:00 +0000
+++ tools/evemu-device.txt 2011-01-05 11:05:09 +0000
@@ -0,0 +1,38 @@
1EVEMU-DEVICE(1)
2===============
3
4NAME
5----
6
7 evemu-device, evemu-play - create a virtual input device and replay an
8 event sequence
9
10SYNOPSIS
11--------
12 evemu-device [description-file]
13
14 evemu-play /dev/input/eventX < event-sequence
15
16DESCRIPTION
17-----------
18evemu-device creates a virtual input device based on the description-file.
19This description is usually created by evemu-describe(1). evemu-device then
20creates a new input device with uinput and prints the name and the device
21file to
22stdout.
23
24evemu-play replays the event sequence given on stdin through the input
25device. The event sequence must be in the form created by evemu-record(1).
26
27evemu-device must be able to write to the uinput device node, and evemu-play
28must be able to write to the device node specified; in most cases this means
29it must be run as root.
30
31SEE ALSO
32--------
33evemu-describe(1)
34evemu-record(1)
35
36AUTHOR
37------
38evemu was written by Henrik Rydberg <rydberg@euromail.se>
039
=== modified file 'tools/evemu-play.c'
--- tools/evemu-play.c 2010-09-22 15:14:42 +0000
+++ tools/evemu-play.c 2011-01-05 11:05:09 +0000
@@ -30,6 +30,7 @@
30#include <stdio.h>30#include <stdio.h>
31#include <fcntl.h>31#include <fcntl.h>
32#include <string.h>32#include <string.h>
33#include <unistd.h>
3334
34int main(int argc, char *argv[])35int main(int argc, char *argv[])
35{36{
3637
=== modified file 'tools/evemu-record.c'
--- tools/evemu-record.c 2010-09-18 17:10:11 +0000
+++ tools/evemu-record.c 2011-01-05 11:05:09 +0000
@@ -30,6 +30,7 @@
30#include <stdio.h>30#include <stdio.h>
31#include <fcntl.h>31#include <fcntl.h>
32#include <string.h>32#include <string.h>
33#include <unistd.h>
3334
34#define WAIT_MS 1000035#define WAIT_MS 10000
3536

Subscribers

People subscribed via source and target branches

to all changes: