<div dir="ltr">About the xlat style stuff. Should I change EV_SYN to 0 in xlat/<a href="http://evdev_ev.in">evdev_ev.in</a> instead?</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018 at 8:20 PM Zhibin Li <<a href="mailto:haoyouab@gmail.com">haoyouab@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018 at 8:08 AM Eugene Syromiatnikov <<a href="mailto:esyr@redhat.com" target="_blank">esyr@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Aug 10, 2018 at 07:12:42PM +0800, Zhibin Li wrote:<br>
> EV_SYN in EVIOCGBIT should be decoded to get other event types EV_*, not<br>
> the precise event codes SYN_*.<br>
<br>
It's not EV_SYN, it's just EVIOCGBIT(0, ...) that returns bitmask with<br>
supported event types, it has nothing with synchronous events.<br></blockquote><div>Yes you're right. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> @@ -259,8 +259,8 @@ bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr,<br>
>  {<br>
>       switch (ev_nr) {<br>
<br>
>               case EV_SYN:<br>
That probably shoud be changed to "case 0".<br></blockquote><div>I missed this one. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> -                     return decode_bitset(tcp, arg, evdev_sync,<br>
> -                                          SYN_MAX, "SYN_???", XT_INDEXED);<br>
> +                     return decode_bitset(tcp, arg, evdev_ev,<br>
> +                                          EV_MAX, "EV_???", XT_NORMAL);<br>
Why not XT_SORTED?<br></blockquote><div>Oh I don't know the detailed usage of these three flags. I should look into xlat code. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
>               case EV_KEY:<br>
>                       return decode_bitset(tcp, arg, evdev_keycode,<br>
>                                            KEY_MAX, "KEY_???", XT_INDEXED);<br>
> diff --git a/ioctl.c b/ioctl.c<br>
> index 93fb5263..d56bf69e 100644<br>
> --- a/ioctl.c<br>
> +++ b/ioctl.c<br>
> @@ -99,7 +99,11 @@ evdev_decode_number(const unsigned int code)<br>
>  <br>
>       if (nr >= 0x20 && nr <= 0x20 + 0x1f) {<br>
>               tprints("EVIOCGBIT(");<br>
> -             printxval(evdev_ev, nr - 0x20, "EV_???");<br>
> +             /* There is no EV_SYN in EVIOCGBIT */<br>
> +             if (nr == 0x20)<br>
> +                     tprintf("0");<br>
> +             else<br>
> +                     printxval(evdev_ev, nr - 0x20, "EV_???");<br>
That doesn't go well with the concept of xlat styles; however, as it is,<br>
it doesn't break anything, at least.</blockquote><div>Any documentation or  references regarding this concept?  I'm looking into </div><div>xlat.c and those related commits now.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- <br>
Strace-devel mailing list<br>
<a href="mailto:Strace-devel@lists.strace.io" target="_blank">Strace-devel@lists.strace.io</a><br>
<a href="https://lists.strace.io/mailman/listinfo/strace-devel" rel="noreferrer" target="_blank">https://lists.strace.io/mailman/listinfo/strace-devel</a><br>
</blockquote></div></div>
</blockquote></div>