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>
This commit is contained in:
Umang Jain 2021-08-10 18:40:19 +05:30
parent fdf1851f0b
commit e552981c8f

View file

@ -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;
}