summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-30 02:44:21 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-10-15 05:05:45 +0300
commit211d6f5ca6adfa5d90a73e753d17478123ba887f (patch)
tree60c0f24629aa24c7e38374a6af037dece9eb6824 /src
parent1526650fc781514200fed74bff0856b6fdbae850 (diff)
libcamera: media_device: Print link information when setup fails
When setting up a link fails, the error message doesn't specify which link is being acted on. This makes debugging more difficult than it should be. Improve the message by printing the link information. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/media_device.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index ccaf039b..aa93da75 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -803,7 +803,11 @@ int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)
if (ret) {
ret = -errno;
LOG(MediaDevice, Error)
- << "Failed to setup link: "
+ << "Failed to setup link "
+ << source->entity()->name() << "["
+ << source->index() << "] -> "
+ << sink->entity()->name() << "["
+ << sink->index() << "]: "
<< strerror(-ret);
return ret;
}