This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l2-ctl: do not fail on kernel not implementing VIDIOC_SUBDEV_S_CLIENT_CAP Author: Quentin Schulz <[email protected]> Date: Tue Oct 7 15:40:03 2025 +0200 VIDIOC_SUBDEV_S_CLIENT_CAP is only available in kernels 6.4 and later. The current logic has a fallback in case the ioctl fails by simply stating there's no capabilities available for the subdev. However, doioctl sets app_result on any ioctl fail (regardless of errno, which is set to ENOIOCTLCMD when this ioctl doesn't exist). Considering app_result is used as the exit code of the program, ignoring the return value of doioctl function is not enough to make this ioctl truly optional. Let's handle this ioctl as optional to avoid kernels lacking it making v4l2-ctl command fail (but still doing what it's been asked to do) by calling test_ioctl directly. Fixes: 2b2ba7e0e86c ("v4l2-ctl/compliance: read and show the subdev client capabilities") Signed-off-by: Quentin Schulz <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> utils/v4l2-ctl/v4l2-ctl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=e9a4ecf9f7537efac50507ead37de27b146e7b69 diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 30a6db694f96..17c262fc88da 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -1371,7 +1371,9 @@ int main(int argc, char **argv) // exit if this ioctl returns an error. doioctl(fd, VIDIOC_SUBDEV_QUERYCAP, &subdevcap); subdevclientcap.capabilities = ~0ULL; - if (doioctl(fd, VIDIOC_SUBDEV_S_CLIENT_CAP, &subdevclientcap)) + // This ioctl was introduced in kernel 6.4, so don't + // exit if this ioctl returns an error. + if (test_ioctl(fd, VIDIOC_SUBDEV_S_CLIENT_CAP, &subdevclientcap)) subdevclientcap.capabilities = 0ULL; } if (!is_subdev) { _______________________________________________ linuxtv-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
