{"id":14102,"url":"https://patchwork.libcamera.org/api/1.1/patches/14102/?format=json","web_url":"https://patchwork.libcamera.org/patch/14102/","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":"<20211012010932.15873-1-laurent.pinchart@ideasonboard.com>","date":"2021-10-12T01:09:32","name":"[libcamera-devel] libcamera: media_device: Print link information when setup fails","commit_ref":"211d6f5ca6adfa5d90a73e753d17478123ba887f","pull_url":null,"state":"accepted","archived":false,"hash":"637ad8681a29ba1b5424d6aa9da95bc582ac16c5","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14102/mbox/","series":[{"id":2615,"url":"https://patchwork.libcamera.org/api/1.1/series/2615/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2615","date":"2021-10-12T01:09:32","name":"[libcamera-devel] libcamera: media_device: Print link information when setup fails","version":1,"mbox":"https://patchwork.libcamera.org/series/2615/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14102/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14102/checks/","tags":{},"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 6C7D8BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Oct 2021 01:09:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2A766027F;\n\tTue, 12 Oct 2021 03:09:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D20E6027A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Oct 2021 03:09:50 +0200 (CEST)","from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A73EDF1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Oct 2021 03:09:49 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IXoFfUcx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634000989;\n\tbh=DpFatmifT1B6cA+iJ6DzSC7cY5fyjYGrxC8J45M3ExQ=;\n\th=From:To:Subject:Date:From;\n\tb=IXoFfUcxJ8/ckSgHpuI+C3X+SbXDyMxfKwdSnk4vy3emakd2gD5oC5G4lViRUzBNy\n\ttU2Cs+p9oEh7w+qEr+fzRPWObCWitMlHFJy/7tE9UBevpnr5Ww7AI2ZZCZCnK+gKgl\n\tCbDNlsenreE4gP4lVyJgY6Ij1WQ/pmSZCbI5hYRI=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 12 Oct 2021 04:09:32 +0300","Message-Id":"<20211012010932.15873-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: media_device: Print link\n\tinformation when setup fails","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"When setting up a link fails, the error message doesn't specify which\nlink is being acted on. This makes debugging more difficult than it\nshould be. Improve the message by printing the link information.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/media_device.cpp | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\n\nbase-commit: fa7a95bf32c6a8ee87b67159d4238cbc8e6dc3a9","diff":"diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex ccaf039ba7a9..aa93da75c593 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -803,7 +803,11 @@ int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)\n \tif (ret) {\n \t\tret = -errno;\n \t\tLOG(MediaDevice, Error)\n-\t\t\t<< \"Failed to setup link: \"\n+\t\t\t<< \"Failed to setup link \"\n+\t\t\t<< source->entity()->name() << \"[\"\n+\t\t\t<< source->index() << \"] -> \"\n+\t\t\t<< sink->entity()->name() << \"[\"\n+\t\t\t<< sink->index() << \"]: \"\n \t\t\t<< strerror(-ret);\n \t\treturn ret;\n \t}\n","prefixes":["libcamera-devel"]}