libcamera: v4l2_device: Report device node on failure

When the V4L2Device fails to open, it is not clear what device
caused the failure. The Entity name is presented, but not the device
node.

Provide it.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2022-09-03 12:50:42 +01:00
parent 29497a73dd
commit ad8af50d86

View file

@ -89,7 +89,8 @@ int V4L2Device::open(unsigned int flags)
UniqueFD fd(syscall(SYS_openat, AT_FDCWD, deviceNode_.c_str(), flags));
if (!fd.isValid()) {
int ret = -errno;
LOG(V4L2, Error) << "Failed to open V4L2 device: "
LOG(V4L2, Error) << "Failed to open V4L2 device '"
<< deviceNode_ << "': "
<< strerror(-ret);
return ret;
}