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)
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))
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)
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)
ctrl.id = iter->id;
ctrl.value = iter->default_value;
} else if (ret)
- return fail("g_ctrl returned an error\n");
+ return fail("g_ctrl returned an error (%d)\n", ret);
else if (checkSimpleCtrl(ctrl, *iter))
return fail("invalid control %08x\n", iter->id);
if (!valid && !ret)
return fail("could set invalid menu item %d\n", i);
if (ret && ret != EINVAL)
- return fail("setting invalid menu item returned wrong error\n");
+ return fail("setting invalid menu item returned wrong error (%d)\n", ret);
}
} else {
// at least min, max and default values should work
if (ctrls.error_idx != 0)
return fail("invalid error index read only control\n");
} else if (ret) {
- return fail("try_ext_ctrls returned an error\n");
+ return fail("try_ext_ctrls returned an error (%d)\n", ret);
}
// Try to set the current value (or the default value for write only controls)
ret = 0;
}
if (ret)
- return fail("s_ext_ctrls returned an error\n");
+ return fail("s_ext_ctrls returned an error (%d)\n", ret);
if (checkExtendedCtrl(ctrl, *iter))
return fail("s_ext_ctrls returned invalid control contents (%08x)\n", iter->id);