[PATCH] v4l2-compliance: Print invalid return codes in control tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 utils/v4l2-compliance/v4l2-test-controls.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/utils/v4l2-compliance/v4l2-test-controls.cpp b/utils/v4l2-compliance/v4l2-test-controls.cpp
index 1a1dc96..e16d71d 100644
--- a/utils/v4l2-compliance/v4l2-test-controls.cpp
+++ b/utils/v4l2-compliance/v4l2-test-controls.cpp
@@ -153,7 +153,7 @@ static int checkQCtrl(struct node *node, struct test_queryctrl &qctrl)
 		qmenu.index = i;
 		ret = doioctl(node, VIDIOC_QUERYMENU, &qmenu);
 		if (ret && ret != EINVAL)
-			return fail("invalid QUERYMENU return code\n");
+			return fail("invalid QUERYMENU return code (%d)\n", ret);
 		if (ret)
 			continue;
 		if (i < qctrl.minimum || i > qctrl.maximum)
@@ -194,7 +194,7 @@ int testQueryControls(struct node *node)
 		if (ret == ENOTTY)
 			return ret;
 		if (ret && ret != EINVAL)
-			return fail("invalid queryctrl return code\n");
+			return fail("invalid queryctrl return code (%d)\n", ret);
 		if (ret)
 			break;
 		if (checkQCtrl(node, qctrl))
@@ -244,7 +244,7 @@ int testQueryControls(struct node *node)
 		qctrl.id = id;
 		ret = doioctl(node, VIDIOC_QUERYCTRL, &qctrl);
 		if (ret && ret != EINVAL)
-			return fail("invalid queryctrl return code\n");
+			return fail("invalid queryctrl return code (%d)\n", ret);
 		if (ret)
 			continue;
 		if (qctrl.id != id)
@@ -260,7 +260,7 @@ int testQueryControls(struct node *node)
 		qctrl.id = id;
 		ret = doioctl(node, VIDIOC_QUERYCTRL, &qctrl);
 		if (ret && ret != EINVAL)
-			return fail("invalid queryctrl return code\n");
+			return fail("invalid queryctrl return code (%d)\n", ret);
 		if (ret)
 			break;
 		if (qctrl.id != id)
-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux