Message ID | 20211012010932.15873-1-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | 211d6f5ca6adfa5d90a73e753d17478123ba887f |
Headers | show |
Series |
|
Related | show |
Quoting Laurent Pinchart (2021-10-12 02:09:32) > 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. > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/libcamera/media_device.cpp | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp > index ccaf039ba7a9..aa93da75c593 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; > } > > base-commit: fa7a95bf32c6a8ee87b67159d4238cbc8e6dc3a9 > -- > Regards, > > Laurent Pinchart >
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp index ccaf039ba7a9..aa93da75c593 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; }
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> --- src/libcamera/media_device.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) base-commit: fa7a95bf32c6a8ee87b67159d4238cbc8e6dc3a9