Commit Graph

20 Commits

Author SHA1 Message Date
b29569aa1d evdev.c: fix EVIOCGVERSION decoding
* evdev.c (evdev_read_ioctl): Print EVIOCGVERSION's argument
using #x format.
2016-05-28 00:56:47 +00:00
563f0cefb1 evdev.c: fix EVIOCGMTSLOTS decoding
* evdev.c (mtslots_ioctl): Use umove_or_printaddr.
2016-05-28 00:56:47 +00:00
14a810e6d8 evdev.c: fix bitset decoding
* evdev.c (decode_bitset): Use umove_or_printaddr.
2016-05-28 00:56:47 +00:00
e54f98a223 evdev.c: fix decoding of struct input_id
* evdev.c (getid_ioctl): Use umove_or_printaddr.
2016-05-28 00:56:47 +00:00
13f8e8fb4e evdev.c: fix decoding of struct input_keymap_entry
* evdev.c (keycode_V2_ioctl): Use umove_or_printaddr.
2016-05-28 00:56:47 +00:00
7954e2a711 evdev.c: fix decoding of EVIOCGKEYCODE/EVIOCSKEYCODE
* evdev.c (keycode_ioctl): Use umove_or_printaddr.
2016-05-28 00:56:47 +00:00
e167006908 evdev.c: fix decoding of struct input_absinfo
* evdev.c (abs_ioctl): Use umove_or_printaddr.
2016-05-28 00:56:46 +00:00
3a45eb3711 evdev.c: fix decoding of struct ff_effect
* evdev.c (ff_effect_ioctl): Use umove_or_printaddr.
Fix printing of struct ff_effect.u member names.
2016-05-28 00:37:06 +00:00
c758ed0f50 evdev.c: fix printing of struct ff_envelope.fade_level
* evdev.c (decode_envelope): Print struct ff_envelope.fade_level
using #x format.
2016-05-28 00:37:06 +00:00
9635df43b6 evdev.c: fix decoding of EVIOCGRAB and EVIOCREVOKE
* evdev.c (evdev_write_ioctl): Print argument of EVIOCGRAB
and EVIOCREVOKE as unsigned long.
2016-05-28 00:37:06 +00:00
0039424cb9 evdev.c: fix EVIOCRMFF decoding
* evdev.c (evdev_write_ioctl): Print EVIOCRMFF's argument as int.
2016-05-28 00:37:06 +00:00
53767d8ec5 evdev.c: move handling of EVIOCGBIT to a separate function
* evdev.c (evdev_read_ioctl): Move EVIOCGBIT handling to ...
(bit_ioctl): ... new function.
2016-05-28 00:37:05 +00:00
8a18f80a37 evdev.c: reorder ioctl command checks
Change the order of ioctl command cheks to match the kernel:
1st, check for fixed-number fixed-length commands,
2nd, check for fixed-number variable-length commands,
3rd, check for multi-number fixed-length commands,
4thm check for multi-number variable-length commands.

* evdev.c (evdev_read_ioctl, evdev_write_ioctl): Reorder
ioctl command checks.
2016-05-28 00:37:05 +00:00
2114e08a87 evdev.c: decode all directions except _IOC_READ on entering syscall
* evdev.c (evdev_write_ioctl): Remove exiting check.
(evdev_read_ioctl): Move entering check ...
(evdev_ioctl): ... here.  Add RVAL_DECODED to return code in _IOC_WRITE
and default cases.
2016-05-28 00:37:05 +00:00
8d85c233d2 evdev.c: fix indentation of preprocessor directives
* evdev.c: Fix indentation of preprocessor directives.
Move inclusion of <linux/ioctl.h> into [HAVE_LINUX_INPUT_H].
2016-05-28 00:37:05 +00:00
b679508f6e Use printpair_int
* evdev.c (repeat_ioctl): Use printpair_int.
* net.c (do_pipe, sys_socketpair): Likewise.
2015-07-09 01:43:44 +00:00
Felix Janda
3460dc486d Include <linux/ioctl.h> for _IOC_* macros
Fix a compilation failure with musl libc.

* evdev.c: Include <linux/ioctl.h>.
* ioctl.c: Include <linux/ioctl.h> instead of <asm/ioctl.h>.
* ioctlsort.c: Likewise.

Reported-by: Dima Krasner <dima@dimakrasner.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2015-03-28 22:37:30 +00:00
7d8b41a4f7 evdev: decode keycode value in EVIOC[GS]KEYCODE_V2 commands
* evdev.c (keycode_V2_ioctl): Use evdev_keycode to print
input_keymap_entry.keycode.
2015-02-22 02:29:55 +00:00
19dadf9401 evdev: fix build with old kernel headers
* configure.ac: Check whether struct input_absinfo.resolution is defined
in <linux/input.h>.
* evdev.c (SYN_MAX): Add fallback definition.
(abs_ioctl): Wrap use of struct input_absinfo.resolution in #ifdef check.
(keycode_V2_ioctl, mtslots_ioctl, repeat_ioctl): Wrap in #ifdef checks.
(evdev_read_ioctl): Wrap in #ifdef checks the code that uses EV_SW,
EVIOCGREP, EVIOCGKEYCODE_V2, EVIOCGMTSLOTS, EVIOCGPROP, and EVIOCGSW.
(evdev_write_ioctl): Wrap in #ifdef checks the code that uses EVIOCSREP,
EVIOCSKEYCODE_V2, EVIOCSCLOCKID, and EVIOCREVOKE.
2015-02-22 02:29:55 +00:00
Etienne Gemsa
4f750b9ad1 Add decoding for evdev ioctls
This patch introduces decoding for evdev ioctls.  For EVIOCSFF the five
first members are decoded, the union is not.  The code was compiled and
tested on x86_64 with Linux 3.13.

* evdev.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (evdev_ioctl): New prototype.
* ioctl.c (ioctl_decode): Call evdev_ioctl for 'E' ioctl commands.
* xlat/evdev_autorepeat.in: New file.
* xlat/evdev_ff_status.in: New file.
* xlat/evdev_ff_types.in: New file.
* xlat/evdev_keycode.in: New file.
* xlat/evdev_leds.in: New file.
* xlat/evdev_misc.in: New file.
* xlat/evdev_mtslots.in: New file.
* xlat/evdev_prop.in: New file.
* xlat/evdev_relative_axes.in: New file.
* xlat/evdev_snd.in: New file.
* xlat/evdev_switch.in: New file.
* xlat/evdev_sync.in: New file.

Signed-off-by: Etienne Gemsa <etienne.gemsa@lse.epita.fr>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2015-02-22 02:29:54 +00:00