v4l2-compliance: fix broken querymenu check.
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 12 Jun 2014 13:58:23 +0000 (15:58 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Thu, 12 Jun 2014 13:58:23 +0000 (15:58 +0200)
QUERYMENU can also return -ENOTTY if it isn't implemented at all.
Allow for that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-compliance/v4l2-test-controls.cpp

index 744d629..2c97df5 100644 (file)
@@ -141,7 +141,7 @@ static int checkQCtrl(struct node *node, struct test_queryctrl &qctrl)
                qmenu.id = qctrl.id;
                qmenu.index = qctrl.minimum;
                ret = doioctl(node, VIDIOC_QUERYMENU, &qmenu);
-               if (ret != EINVAL)
+               if (ret != EINVAL && ret != ENOTTY)
                        return fail("can do querymenu on a non-menu control\n");
                return 0;
        }