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>
This commit is contained in:
parent
1526650fc7
commit
211d6f5ca6
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue