summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2021-08-10 18:40:19 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2021-08-10 18:41:51 +0530
commite552981c8f77981390dc4241525276648d616a37 (patch)
tree8a89af957cf14a88b5e295deb7ad60ffff3ee87b
parentfdf1851f0b5f4d31bb61ce63726dcee6d6e647fa (diff)
libcamera: MappedFrameBuffer: Print errno on mmap() failure
In mmap() error handling path, errno is stored but never printed in the error log. Print it. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/mapped_framebuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp
index 4ac45083..2ebe9fdb 100644
--- a/src/libcamera/mapped_framebuffer.cpp
+++ b/src/libcamera/mapped_framebuffer.cpp
@@ -182,7 +182,8 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)
MAP_SHARED, plane.fd.fd(), 0);
if (address == MAP_FAILED) {
error_ = -errno;
- LOG(Buffer, Error) << "Failed to mmap plane";
+ LOG(Buffer, Error) << "Failed to mmap plane: "
+ << strerror(-error_);
break;
}