]> granicus.if.org Git - strace/commitdiff
v4l2: add decoding for VIDIOC_S_CROP's arg
authorPhilippe De Muyter <phdm@macqel.be>
Wed, 20 May 2015 15:50:21 +0000 (17:50 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 May 2015 17:48:38 +0000 (17:48 +0000)
* v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_S_CROP's arg.

v4l2.c

diff --git a/v4l2.c b/v4l2.c
index f04d1f102416717ad2a1deb87140b4c74d964bbb..6377717b7e7983eb1b034430026516a5c9540541 100644 (file)
--- a/v4l2.c
+++ b/v4l2.c
@@ -568,6 +568,17 @@ v4l2_ioctl(struct tcb *tcp, const unsigned int code, long arg)
                return 1;
        }
 
+       case VIDIOC_S_CROP: {
+               struct v4l2_crop c;
+
+               if (exiting(tcp) || umove(tcp, arg, &c) < 0)
+                       return 0;
+               tprints(", {type=");
+               printxval(v4l2_buf_types, c.type, "V4L2_BUF_TYPE_???");
+               tprintf(", c=" FMT_RECT "}", ARGS_RECT(c.c));
+               return 1;
+       }
+
        case VIDIOC_G_FBUF:
        case VIDIOC_S_FBUF: {
                struct v4l2_framebuffer b;