[PATCH] v4l2.c: a new (incomplete) decoder for Video4Linux ioctls args
Dmitry V. Levin
ldv at altlinux.org
Sat May 31 00:51:24 UTC 2014
On Fri, May 30, 2014 at 11:44:41AM +0200, Philippe De Muyter wrote:
> * v4l2.c: new file.
> * ioctl.c, defs.h, Makefile.am: hook v4l2.o:v4l2_ioctl into strace.
> * NEWS: spread the news :)
I've just pushed pending xlat changes to master branch.
You can convert your code to the new form, e.g. using
$ ./generate_xlat_in.sh v4l2.c
[...]
> +static void print_pixelformat(__u32 fourcc)
Please use uint32_t instead.
> +static void print_v4l2_format(const struct v4l2_format *fmt)
> +{
> + tprintf("type=");
> + printxval(v4l2_buf_types, fmt->type, "V4L2_BUF_TYPE_???");
> + tprintf(", fmt={");
> + switch (fmt->type) {
> + case V4L2_BUF_TYPE_VIDEO_CAPTURE:
> + case V4L2_BUF_TYPE_VIDEO_OUTPUT:
> + tprintf("pix={width=%u, height=%u, pixelformat=", fmt->fmt.pix.width, fmt->fmt.pix.height);
> + print_pixelformat(fmt->fmt.pix.pixelformat);
> + tprintf(", field=");
Here and in other places please use tprints for simple strings.
[...]
> +#if 0
Is this a comment or some leftover code?
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140531/b6a0592c/attachment.bin>
More information about the Strace-devel
mailing list