]> granicus.if.org Git - strace/commit
evdev: decode struct input_absinfo regardless of in-kernel definitions
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 17 Oct 2019 13:29:50 +0000 (15:29 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 22 Oct 2019 17:44:08 +0000 (19:44 +0200)
commitf4a67819e9072af7ec79a461bdfae0aef60ed9b1
treefbdbc3bf7528b54f8bf9b016d225194bf5a53d69
parent73bfda40f86abe8821291c5654421916fb896fa4
evdev: decode struct input_absinfo regardless of in-kernel definitions

* evdev.c (struct_input_absinfo): New typedef.
(abs_ioctl): Add code argument. Add orig_sz, res_sz, sz, read_sz local
variables. Decode resolution field regardless of
HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION.
(evdev_read_ioctl, evdev_write_ioctl): Pass code to abs_ioctl.
* tests/ioctl_evdev-success.c (print_input_absinfo): Update expected
output.
(main): Add absinfo_sz, absinfo_24, absinfo_32 local variables; add
additional checks for struct input_absinfo.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1758201
evdev.c
tests/ioctl_evdev-success.c