[strace/strace] Add lirc ioctl decoding (PR #208)
Eugene Syromyatnikov
evgsyr at gmail.com
Thu Feb 10 04:31:27 UTC 2022
On Mon, Feb 07, 2022 at 11:00:43AM -0800, Sean Young via Strace-devel wrote:
> Ready for review again.
Looks great, thank you.
> diff --git a/tests/ioctl_lirc.c b/tests/ioctl_lirc.c
> new file mode 100644
> index 0000000..df601e9
> --- /dev/null
> +++ b/tests/ioctl_lirc.c
> + value = 40000;
> + do_ioctl(LIRC_SET_REC_CARRIER_RANGE, &value);
> + printf("ioctl(-1, IPMICTL_SET_MAINTENANCE_MODE_CMD or LIRC_SET_REC_CARRIER_RANGE, [40000]) = %s\n",
> + errstr);
In strace, string literals tend to be wrapped to be under 80 columns
as well:
printf("ioctl(-1, IPMICTL_SET_MAINTENANCE_MODE_CMD"
" or LIRC_SET_REC_CARRIER_RANGE, [40000]) = %s\n",
errstr);
> + printf("ioctl(-1, LIRC_GET_FEATURES, [LIRC_CAN_SEND_PULSE|LIRC_CAN_SET_SEND_DUTY_CYCLE|LIRC_CAN_USE_WIDEBAND_RECEIVER|LIRC_CAN_GET_REC_RESOLUTION|0x8000000]) = %s\n",
> + errstr);
printf("ioctl(-1, LIRC_GET_FEATURES, [LIRC_CAN_SEND_PULSE"
"|LIRC_CAN_SET_SEND_DUTY_CYCLE|LIRC_CAN_USE_WIDEBAND_RECEIVER"
"|LIRC_CAN_GET_REC_RESOLUTION|0x8000000]) = %s\n",
errstr);
> + do_ioctl(LIRC_GET_FEATURES, (unsigned int*)0x40000);
It is usually formatted as follows in strace:
do_ioctl(LIRC_GET_FEATURES, (unsigned int *) 0x40000);
Since these are just minor formatting nits,
Reviewed-by: Eugene Syromyatnikov <evgsyr at gmail.com>
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/strace/strace/pull/208#issuecomment-1031810043
> You are receiving this because you are subscribed to this thread.
>
> Message ID: <strace/strace/pull/208/c1031810043 at github.com>
> --
> Strace-devel mailing list
> Strace-devel at lists.strace.io
> https://lists.strace.io/mailman/listinfo/strace-devel
More information about the Strace-devel
mailing list