Patch Detail
Show a patch.
GET /api/1.1/patches/2193/?format=api
{ "id": 2193, "url": "https://patchwork.libcamera.org/api/1.1/patches/2193/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2193/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20191015140207.8227-1-laurent.pinchart@ideasonboard.com>", "date": "2019-10-15T14:02:07", "name": "[libcamera-devel] libcamera: v4l2_device: Print control ID in unknown type log messagge", "commit_ref": "876b90086215ce933ceb7f2822ba9a9688e07c14", "pull_url": null, "state": "accepted", "archived": false, "hash": "d59b8b4959ef90c12dee3b27961bc2add6fdbe75", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2193/mbox/", "series": [ { "id": 535, "url": "https://patchwork.libcamera.org/api/1.1/series/535/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=535", "date": "2019-10-15T14:02:07", "name": "[libcamera-devel] libcamera: v4l2_device: Print control ID in unknown type log messagge", "version": 1, "mbox": "https://patchwork.libcamera.org/series/535/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2193/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2193/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B44961562\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Oct 2019 16:02:14 +0200 (CEST)", "from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 41E8D324;\n\tTue, 15 Oct 2019 16:02:13 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1571148133;\n\tbh=uncwVmLCHmeqp27j2Ov1xeBZ0oNfcfZiPzGsVmcduEc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rvjPYVAWhMAo/U3sArCCZW80ueE7QLDuN9gj/M9lhkReruSRPwn9v1fYZzcKauYeq\n\tTaTA6TABAeCmvRNX58QLoMi7BTDfIOJ5KtNxISo16MSWcj54BzjG7Ueed8ngunBLhN\n\tSZ5MJMN3iqEWT8oDID7lX3DJh7UD9ljFLpfpdqug=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 15 Oct 2019 17:02:07 +0300", "Message-Id": "<20191015140207.8227-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20191015000743.GA5976@bigcity.dyn.berto.se>", "References": "<20191015000743.GA5976@bigcity.dyn.berto.se>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_device: Print control ID\n\tin unknown type log messagge", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "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": "Tue, 15 Oct 2019 14:02:14 -0000" }, "content": "When the type of a control enumerated from a V4L2 device is not\nsupported, we log a debug message that mentions the control type. This\nmakes it hard to figure out which control is faulty. Print the control\nID instead.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/v4l2_device.cpp | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex b47ba448f354..68f2d44d11f4 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -8,11 +8,13 @@\n #include \"v4l2_device.h\"\n \n #include <fcntl.h>\n+#include <iomanip>\n #include <string.h>\n #include <sys/ioctl.h>\n #include <unistd.h>\n \n #include \"log.h\"\n+#include \"utils.h\"\n #include \"v4l2_controls.h\"\n \n /**\n@@ -371,8 +373,9 @@ void V4L2Device::listControls()\n \t\t\tbreak;\n \t\t/* \\todo Support compound controls. */\n \t\tdefault:\n-\t\t\tLOG(V4L2, Debug) << \"Control type '\" << ctrl.type\n-\t\t\t\t\t << \"' not supported\";\n+\t\t\tLOG(V4L2, Debug)\n+\t\t\t\t<< \"Control \" << utils::hex(ctrl.id)\n+\t\t\t\t<< \" has unsupported type \" << ctrl.type;\n \t\t\tcontinue;\n \t\t}\n \n", "prefixes": [ "libcamera-devel" ] }