[{"id":24915,"web_url":"https://patchwork.libcamera.org/comment/24915/","msgid":"<YxNYszYxjIWt7v6u@pendragon.ideasonboard.com>","date":"2022-09-03T13:37:55","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_device: Report device\n\tnode on failure","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Sat, Sep 03, 2022 at 12:50:42PM +0100, Kieran Bingham via libcamera-devel wrote:\n> When the V4L2Device fails to open, it is not clear what device\n> caused the failure. The Entity name is presented, but not the device\n> node.\n> \n> Provide it.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/v4l2_device.cpp | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 1d899657bf7d..29a800a5cee3 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -90,6 +90,7 @@ int V4L2Device::open(unsigned int flags)\n>  \tif (!fd.isValid()) {\n>  \t\tint ret = -errno;\n>  \t\tLOG(V4L2, Error) << \"Failed to open V4L2 device: \"\n\nYou can drop the colon at the end of this line.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t\t\t\t << deviceNode_ << \": \"\n>  \t\t\t\t << strerror(-ret);\n>  \t\treturn ret;\n>  \t}","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C1BCFC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  3 Sep 2022 13:38:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4EAB262032;\n\tSat,  3 Sep 2022 15:38:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6B8C61FBB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  3 Sep 2022 15:38:10 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D399F4A8;\n\tSat,  3 Sep 2022 15:38:09 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662212292;\n\tbh=KqJWzRWAWeXO4t1ZEgSa28e/l2FMqAFw3XmkH+tFexM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=3GmQHiLQmZIVk4QXk1/iKphcAm83aMdziteQM5gLT8UAfLbAkIDAhN84SSD+OgLfd\n\tD9ymTif6AA9iDD98qVTwsW0XmO9jRUHwvvDWJMXNgK/5BVpKSyZWPd1iJCkKu4Iro4\n\txEgqqQ16kz+KXgIOq3UrzXU2AaTr/E2u0UQPQkQOfeHwvmVt3o6XzYXJwVrpD5JBCp\n\tnA17p8kVqjDzoaYYzV3T+cJ8LhtkjkCynu8wGeE6yxES15iO/5tRgKYEp5KLjAQEAP\n\tKpsUoluqk+i8Wyu80o3Jb5hyZVLQB5BkPKDfMgY8AXe+sBggf4EySgGiK4Xh2hriEJ\n\teyP5UZ4ppqC6g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662212290;\n\tbh=KqJWzRWAWeXO4t1ZEgSa28e/l2FMqAFw3XmkH+tFexM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WOPbwHpwdPQas4D4AApegM1IdZI9L/LVmzhTNVtxTDr6PZgsj56EyUpPF7RcgSyS2\n\tFU+s6kZt7F8PW0Rm2nsJjNMhN6Gf0BGaJW4/zsdMI6G+9cicnBtmPGuWwmuAD2eujB\n\tMvG39liFxG7P3rDyg06JqHtVENx5qcNUd3UdqTJM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"WOPbwHpw\"; dkim-atps=neutral","Date":"Sat, 3 Sep 2022 16:37:55 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YxNYszYxjIWt7v6u@pendragon.ideasonboard.com>","References":"<20220903115042.954797-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220903115042.954797-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_device: Report device\n\tnode on failure","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24916,"web_url":"https://patchwork.libcamera.org/comment/24916/","msgid":"<YxNbDsXnK0EAXiff@pendragon.ideasonboard.com>","date":"2022-09-03T13:47:58","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_device: Report device\n\tnode on failure","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sat, Sep 03, 2022 at 04:37:55PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Sat, Sep 03, 2022 at 12:50:42PM +0100, Kieran Bingham via libcamera-devel wrote:\n> > When the V4L2Device fails to open, it is not clear what device\n> > caused the failure. The Entity name is presented, but not the device\n> > node.\n> > \n> > Provide it.\n> > \n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  src/libcamera/v4l2_device.cpp | 1 +\n> >  1 file changed, 1 insertion(+)\n> > \n> > diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> > index 1d899657bf7d..29a800a5cee3 100644\n> > --- a/src/libcamera/v4l2_device.cpp\n> > +++ b/src/libcamera/v4l2_device.cpp\n> > @@ -90,6 +90,7 @@ int V4L2Device::open(unsigned int flags)\n> >  \tif (!fd.isValid()) {\n> >  \t\tint ret = -errno;\n> >  \t\tLOG(V4L2, Error) << \"Failed to open V4L2 device: \"\n> \n> You can drop the colon at the end of this line.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nActually, as I suspect deviceNode_ to be an empty string in the case\nyou're trying to address, this would print\n\n[0:23:47.240792321] [8216] ERROR V4L2 v4l2_device.cpp:92 'dw9719 2-000c': Failed to open V4L2 device : No such file or directory\n\nwhich isn't great. Adding quotes would help\n\n  \t\tLOG(V4L2, Error) << \"Failed to open V4L2 device `\"\n\t\t\t\t << deviceNode_ << \"': \"\n\t\t\t\t << strerror(-ret);\n\nas it would turn the message into\n\n[0:23:47.240792321] [8216] ERROR V4L2 v4l2_device.cpp:92 'dw9719 2-000c': Failed to open V4L2 device `': No such file or directory\n\n> > +\t\t\t\t << deviceNode_ << \": \"\n> >  \t\t\t\t << strerror(-ret);\n> >  \t\treturn ret;\n> >  \t}","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 150CEC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  3 Sep 2022 13:48:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 69FA462033;\n\tSat,  3 Sep 2022 15:48:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 67D6261FBB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  3 Sep 2022 15:48:11 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BC8D94A8;\n\tSat,  3 Sep 2022 15:48:10 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662212892;\n\tbh=ukfrRyCw6VkAhgmRiivPTsAfsi1/kGfMMogD83Ju2uY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=WSOPMmccrmz8PhpBQfaaLbVKaKS62dq9FLfHg9EjMkL/Rt9qovpaNqnSW7WD2aoEX\n\t4RRvkAIZ7U1B7LzYEGXHxldDnJ+scgh+5ePnd/xyjKKZLdS41DcRfyt7fzTXSAq6bc\n\t2G7c7NdcKocyHXtB2pXF4X5iowYSfut6RfHM/swv7ThbRcgNb7XIXqEXi3I66AszIn\n\tHz5vO4z3udQyv3vDegjjhpfcOG260Ugaint5VCeyRlmQTh2q+IVIz98jAPCPJzbZpI\n\tJoUAYZxTtuCXUObc1wJ9Xmtj519tgvbvuYpvtvOcmdsNTj/LZQGKF4SaFyHC5g+MkR\n\tYwlBhr1Yg4DTw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662212891;\n\tbh=ukfrRyCw6VkAhgmRiivPTsAfsi1/kGfMMogD83Ju2uY=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=IYjPf9z41Pz/E5fm9qq53Y7WrqnQdHMKWrAszKBqwbxHDlPVLWdSKNAuzFs/zfk0X\n\taSUFafyfnNA53mvI/LNB/iNI2G0BsXcNEsbgKxbF+zEnErG9zmhPMtd8FpjzCIJbI3\n\tMNScIngXRTx/Zl/xlijM9MIW+hwYPLnVx7eVXKKI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IYjPf9z4\"; dkim-atps=neutral","Date":"Sat, 3 Sep 2022 16:47:58 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<YxNbDsXnK0EAXiff@pendragon.ideasonboard.com>","References":"<20220903115042.954797-1-kieran.bingham@ideasonboard.com>\n\t<YxNYszYxjIWt7v6u@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YxNYszYxjIWt7v6u@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_device: Report device\n\tnode on failure","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24927,"web_url":"https://patchwork.libcamera.org/comment/24927/","msgid":"<efecfde6-c611-f728-e5a0-2922782a8101@ideasonboard.com>","date":"2022-09-05T05:49:36","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_device: Report device\n\tnode on failure","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patches.\n\nOn 9/3/22 7:07 PM, Laurent Pinchart via libcamera-devel wrote:\n> Hi Kieran,\n>\n> Thank you for the patch.\n>\n> On Sat, Sep 03, 2022 at 12:50:42PM +0100, Kieran Bingham via libcamera-devel wrote:\n>> When the V4L2Device fails to open, it is not clear what device\n>> caused the failure. The Entity name is presented, but not the device\n>> node.\n>>\n>> Provide it.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>   src/libcamera/v4l2_device.cpp | 1 +\n>>   1 file changed, 1 insertion(+)\n>>\n>> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n>> index 1d899657bf7d..29a800a5cee3 100644\n>> --- a/src/libcamera/v4l2_device.cpp\n>> +++ b/src/libcamera/v4l2_device.cpp\n>> @@ -90,6 +90,7 @@ int V4L2Device::open(unsigned int flags)\n>>   \tif (!fd.isValid()) {\n>>   \t\tint ret = -errno;\n>>   \t\tLOG(V4L2, Error) << \"Failed to open V4L2 device: \"\n> You can drop the colon at the end of this line.\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nWith error-messages' pendantics applied,\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>\n>> +\t\t\t\t << deviceNode_ << \": \"\n>>   \t\t\t\t << strerror(-ret);\n>>   \t\treturn ret;\n>>   \t}","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B565DC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Sep 2022 05:49:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2B8D06204F;\n\tMon,  5 Sep 2022 07:49:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2D826041F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Sep 2022 07:49:42 +0200 (CEST)","from [IPV6:2401:4900:1f3f:3b55:213a:3c32:c7d0:be1e] (unknown\n\t[IPv6:2401:4900:1f3f:3b55:213a:3c32:c7d0:be1e])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 737494A8;\n\tMon,  5 Sep 2022 07:49:41 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662356984;\n\tbh=puoeYj0bsCuMw85uIUsSQQClGLb+HxWnxQ3s1a0Vz70=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=KkNvZIO2o4S+SmNERyBForRc6jOBeltvYUJpercL9I7VU89vuj7OH/TN2M6ox+c2h\n\t+LDn8ogNRiaxybYe/DGOTDtc60MUs5H8PVly1e1nIrkxv3MThSp9JN8uUWoR3hmddn\n\tTyRAI1DrvLaCLQWLUFL+rkdj522panqvOuV76jTjSZqIxhBP9wudEjCXwvAZAwEBct\n\tbL+wjhyDKnNDCb9ygZjAVBUezHF10GnngjJ5PbJ0qpZV1hoD5usG0Fs7UaE7uZr8QU\n\tqlmthMSudyHdcXCW+aLcn8aIevNEuuwGt3iGx508dGaCqe4sW8JwekpQpJR/LWUnmx\n\tlb+FID1h5yu7Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662356982;\n\tbh=puoeYj0bsCuMw85uIUsSQQClGLb+HxWnxQ3s1a0Vz70=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=PYdcsEDBMNxhCFfKUXyJgAlQoSlyF2ck4+VVLafSzFk4iRnWBM4fg50i+LEbj6Vqj\n\tlXk/PmWO2hlXyq4p8HCJHM4O33FpRT/ZqNqs7OwE60OIWuIO1Xu+IPunzs7vXRntpU\n\tT9ikCCVg6tHxHI+vhr6oorJCkSdVTwon31heQadU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"PYdcsEDB\"; dkim-atps=neutral","Message-ID":"<efecfde6-c611-f728-e5a0-2922782a8101@ideasonboard.com>","Date":"Mon, 5 Sep 2022 11:19:36 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.12.0","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20220903115042.954797-1-kieran.bingham@ideasonboard.com>\n\t<YxNYszYxjIWt7v6u@pendragon.ideasonboard.com>","In-Reply-To":"<YxNYszYxjIWt7v6u@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_device: Report device\n\tnode on failure","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]