diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2018-04-02 21:09:15 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2018-04-27 00:56:25 +0000 |
commit | 86bfc08a926ffc56a1309944c007ccfb1e4dd6fd (patch) | |
tree | c151d4c6a8243064c31b31795775d4776848a54f /ioctl.c | |
parent | 728e9167e220bf930cecd3b31a47265a316cea4f (diff) | |
download | strace-86bfc08a926ffc56a1309944c007ccfb1e4dd6fd.tar.gz |
Switch to use of value-indexed xlats for evdev constants
* xlat/evdev_abs.in: Add "#value_indexed" directive.
* xlat/evdev_autorepeat.in: Likewise.
* xlat/evdev_ff_status.in: Likewise.
* xlat/evdev_keycode.in: Likewise.
* xlat/evdev_leds.in: Likewise.
* xlat/evdev_misc.in: Likewise.
* xlat/evdev_prop.in: Likewise.
* xlat/evdev_relative_axes.in: Likewise.
* xlat/evdev_snd.in: Likewise.
* xlat/evdev_switch.in: Likewise.
* xlat/evdev_sync.in: Likewise.
* xlat/evdev_ff_types.in: Add a comment about sorting.
* evdev.c (keycode_ioctl, keycode_V2_ioctl): Use printxval_index
instead of printxval.
(bit_ioctl): Use XT_SORTED for evdev_ff_types, use XT_INDEXED
for other xlats.
(evdev_read_ioctl): Use XT_INDEXED for all xlats.
* ioctl.c (evdev_decode_number): Use printxval_indexn instead of
printxval for evdev_abs.
Diffstat (limited to 'ioctl.c')
-rw-r--r-- | ioctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -87,7 +87,8 @@ evdev_decode_number(const unsigned int code) if (_IOC_DIR(code) == _IOC_WRITE) { if (nr >= 0xc0 && nr <= 0xc0 + 0x3f) { tprints("EVIOCSABS("); - printxval(evdev_abs, nr - 0xc0, "ABS_???"); + printxval_indexn(evdev_abs, evdev_abs_size, nr - 0xc0, + "ABS_???"); tprints(")"); return 1; } @@ -103,7 +104,8 @@ evdev_decode_number(const unsigned int code) return 1; } else if (nr >= 0x40 && nr <= 0x40 + 0x3f) { tprints("EVIOCGABS("); - printxval(evdev_abs, nr - 0x40, "ABS_???"); + printxval_indexn(evdev_abs, evdev_abs_size, nr - 0x40, + "ABS_???"); tprints(")"); return 1; } |