[RFC/PATCH v1 1/3] fix decoder of ioctl EVIOCGBIT
Dmitry V. Levin
ldv at altlinux.org
Sun Aug 19 11:21:33 UTC 2018
On Sun, Aug 19, 2018 at 07:08:28PM +0800, Zhibin Li wrote:
> On Sun, Aug 19, 2018 at 4:38 PM Dmitry V. Levin <ldv at altlinux.org> wrote:
[...]
> > @@ -99,7 +97,10 @@ evdev_decode_number(const unsigned int code)
> >
> > if (nr >= 0x20 && nr <= 0x20 + 0x1f) {
> > tprints("EVIOCGBIT(");
> > - printxval(evdev_ev, nr - 0x20, "EV_???");
> > + if (nr == 0x20)
> > + tprintf("0");
> > + else
> > + printxval(evdev_ev, nr - 0x20, "EV_???");
> >
> BTW, a few days ago eSyr said in the mail thread that this part doesn't go
> well with the concept of xlat styles. Should I modified xlat/evdev_ev.in
> instead? But simply changing EV_SYN to 0 won't work because 0 isn't an
> identifier which can be used as a macro name. Any possible solution that I
> can check?
"0" is exception, it goes well with almost everything.
If it was something else, e.g. 1, it wouldn't work, but, fortunately, it's 0.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180819/f0b402d9/attachment.bin>
More information about the Strace-devel
mailing list