Age | Commit message (Collapse) | Author | Files | Lines |
|
This will also make commands like following work, and gracefully
exit after play the recording once.
`echo | evemu-play recording`
|
|
Required for pipelines to run after some infrastructure changes, see
https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
|
|
versionsort keeps the device list in proper numerical order (e.g. so
that event10 is sorted after event9, not event1), but is only available
when compiling with the GNU C library.
Signed-off-by: Harry Cutts <hcutts@google.com>
|
|
program_invocation_short_name is a GNU-specific extension of the C
library, and therefore isn't available when compiling with other
implementations.
Signed-off-by: Harry Cutts <hcutts@google.com>
|
|
Kernel 5.8 changed the value of SW_MAX but libevdev has a built-in check for
out-of-range bits (it silently discards those).
So where evemu is built against a new kernel but a libevdev that hasn't been
updated yet, our test expects bit up to the new SW_MAX while libevdev
discards all bits above the old SW_MAX.
Fix this by making sure the test and uses the same value of the
respective type max as evemu itself does.
Fixes #3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
Run a distcheck after a build and hope for the best.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Runs configure on its own which will reduce the CI messiness a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Commit 30973c0b fixed the build with kernels >= 4.16 but as a side
effect, build with kernels < 4.16 is now failing on:
evemu.c:892:18: error: ‘struct input_event’ has no member named ‘input_event_usec’
tv.tv_usec = ev->input_event_usec;
^~
Fix this error by defining input_event_sec and input_event_usec if
needed
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Commit 30973c0b forgot to update all occurences of input_event, this
will result in the following build failure with kernel >= 4.16:
evemu.c: In function 'write_event_desc':
evemu.c:753:23: error: 'const struct input_event' has no member named 'time'; did you mean 'type'?
time = millis(&ev->time);
^~~~
type
Fixes:
- http://autobuild.buildroot.org/results/487dd5056ec0a977d55b23417d5db2664dcc91fa
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
This way it's linked against evemu and we can override this for testing
(LD_PRELOAD, etc.). And it has the benefit of gdb still working.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The struct input_event is not y2038 safe.
Update the struct according to the kernel patch:
https://lkml.org/lkml/2018/1/6/324
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
So we're not dependent on kernel version we build on.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The compiler was probably smart enough to figure that out, but still.
No functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The warning in case of a missing output file when using --autorestart
is talking about --autoresume which doesn't exist. This is confusing so
fix this.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Fixes the following compile failure when building with musl:
find_event_devices.c: In function ‘find_event_devices’:
find_event_devices.c:60:14: error: ‘PATH_MAX’ undeclared (first use in this function)
char fname[PATH_MAX];
^~~~~~~~
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Add a binding to get the current value of an EV_ABS value.
https://bugs.freedesktop.org/show_bug.cgi?id=102615
Signed-off-by: Benjamin Berg <bberg@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
check_evemu_read() is only use locally in this module. It should be static.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
In case the output file could not have been opened, it is accessed anyways
although it's zero, resulting in a segmentation fault.
So let's free it in the out-path only if allocated before.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We had incremented the argv pointer once too often here. What was read
is some buffer outside of our scope, not the next argument after the
device. Right before, "prefix" is already set up to point to the user's
output file path. Let's use it.
I guess people work around and always use redirection of stdout in order
to get a file instead. This makes writing directly work.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
In case the output file cannot be opened, the message is the only thing
that gets printed and really should contain a newline in order to have
a sane commandline prompt, for example.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
It's supposed to say "current" instead of "curent".
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
output and autorestart are only used in evemu-record. Declaring them static
makes things a little more readable.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Related to https://bugs.freedesktop.org/show_bug.cgi?id=101150
For a negatice time delta (can happen on autoresume, see the bug) we end up
printing +-25ms. This patch doesn't fix the negative time delta but at least
switches it to just print -25ms.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
It's a false positive because we only ever print /dev/input/eventXX but let's
shut it up anyway.
find_event_devices.c: In function ‘find_event_devices’:
find_event_devices.c:65:9: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 53 [-Wformat-truncation=]
"%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
^~
find_event_devices.c:64:3: note: ‘snprintf’ output between 12 and 267 bytes into a destination of size 64
snprintf(fname, sizeof(fname),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Python3 uses unicode and byte arrays need to be explicitly encoded/decoded in
Python3 to avoid the ctypes TypeError when converting between python strings
and C strings.
https://bugs.freedesktop.org/show_bug.cgi?id=97458
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
NULL-pointers are None, not 0. This only worked because we kept falling
through until some other later condition triggered and happened to return the
correct value at all times (usually because the type/code ended up as -1)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
A fairly subtle difference, but "is None" is preferred.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Allows running through the event sequence more than once without any extra
handling. In modern recordings the description and the event file is in the
same file and there is no extra fd handling for the events. So simple code to
check events would look like this:
d = evemu.Device("/path/to/file", create=False)
for e in d.events():
check_for_something()
for e in d.events():
check_for_something_else()
Simply rewinding the fd is sufficient here to avoid the caller having to keep
a copy of the events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=97956
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Needed often enough, might as well print it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
|
|
It's already a fatal error, print it that way.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
|
|
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
$ evemu-play touchpad.evemu
will create the device from the recording and prompt the user to hit enter
before replaying the sequence. Re-playing the same sequence multiple times
just requires hitting enter again.
https://bugs.freedesktop.org/show_bug.cgi?id=96688
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
No real code changes, this just merges the two files in preparation for a
multi-mode evemu-play.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
bugzilla attachments sometimes have CRLF as end of line, make sure we ignore
that for the device name. Otherwise our device name contains the \r, affecting
printfs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
Keep any file that has events in it and keep the last file (i.e. when
evemu-record was cancelled).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|