{"id":1881,"url":"https://patchwork.libcamera.org/api/1.1/patches/1881/?format=json","web_url":"https://patchwork.libcamera.org/patch/1881/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190829080919.16396-1-niklas.soderlund@ragnatech.se>","date":"2019-08-29T08:09:19","name":"[libcamera-devel] libcamera: v4l2_device: Fix error messages in setControls()","commit_ref":"808a7fc04efb502494b0c8dc81dd143c0b652fc2","pull_url":null,"state":"accepted","archived":false,"hash":"c3d0f160b3330e76d8b9a58d5da8fac767b4ea8e","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/1.1/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1881/mbox/","series":[{"id":473,"url":"https://patchwork.libcamera.org/api/1.1/series/473/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=473","date":"2019-08-29T08:09:19","name":"[libcamera-devel] libcamera: v4l2_device: Fix error messages in setControls()","version":1,"mbox":"https://patchwork.libcamera.org/series/473/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1881/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1881/checks/","tags":{},"headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00DA560BCF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Aug 2019 10:09:36 +0200 (CEST)","from bismarck.berto.se (unknown [46.114.35.223])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 5373383e-ca34-11e9-903a-005056917f90;\n\tThu, 29 Aug 2019 10:09:33 +0200 (CEST)"],"X-Halon-ID":"5373383e-ca34-11e9-903a-005056917f90","Authorized-sender":"niklas@soderlund.pp.se","From":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 29 Aug 2019 10:09:19 +0200","Message-Id":"<20190829080919.16396-1-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.22.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: v4l2_device: Fix error\n\tmessages in setControls()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Thu, 29 Aug 2019 08:09:37 -0000"},"content":"The error messages looks copied from getControls() without being updated\nfor the set controls case, fix this.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/v4l2_device.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex f89546610ac69ba0..349bf2d2970418e4 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -287,13 +287,13 @@ int V4L2Device::setControls(V4L2ControlList *ctrls)\n \n \t\t/* Generic validation error. */\n \t\tif (errorIdx == 0 || errorIdx >= count) {\n-\t\t\tLOG(V4L2, Error) << \"Unable to read controls: \"\n+\t\t\tLOG(V4L2, Error) << \"Unable to set controls: \"\n \t\t\t\t\t << strerror(ret);\n \t\t\treturn -EINVAL;\n \t\t}\n \n \t\t/* A specific control failed. */\n-\t\tLOG(V4L2, Error) << \"Unable to read control \" << errorIdx\n+\t\tLOG(V4L2, Error) << \"Unable to set control \" << errorIdx\n \t\t\t\t << \": \" << strerror(ret);\n \t\tcount = errorIdx - 1;\n \t\tret = errorIdx;\n","prefixes":["libcamera-devel"]}