[PATCH evemu] Rewind the fp to the beginning of the first event line

Benjamin Tissoires benjamin.tissoires at gmail.com
Wed Jul 29 16:13:27 PDT 2015


On Mon, Jul 27, 2015 at 10:35 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> evemu_read reads lines until they start with E:, i.e. the first event line.
> evemu_read_event then contines from that position. This causes us to miss the
> first event.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---

Oh, that was a nasty one. Thanks for spotting it.

I have now pushed both patches (the delta timestamps and this one):
   79b29f0..17f901f  master -> master

I'll probably do a release of v2.2 tomorrow so distributions will get
access to the new features/comments :)

Cheers,
Benjamin

>  src/evemu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/evemu.c b/src/evemu.c
> index 8b149b0..19a372b 100644
> --- a/src/evemu.c
> +++ b/src/evemu.c
> @@ -691,6 +691,8 @@ int evemu_read(struct evemu_device *dev, FILE *fp)
>
>         rc = 1;
>
> +       fseek(fp, -strlen(line), SEEK_CUR);
> +
>  out:
>         free(line);
>         return rc;
> --
> 2.4.3
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list