aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcamera
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-09-03 12:50:42 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-09-05 17:34:49 +0100
commitad8af50d86c931543590ddb7f5b4490fdfc227f4 (patch)
tree676bcd1295f92ee6d54a242d70dccecfa9bb7ea6 /src/libcamera
parent29497a73dd67bbfc7062570738aa8d7e026fd633 (diff)
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>
Diffstat (limited to 'src/libcamera')
-rw-r--r--src/libcamera/v4l2_device.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 7f251bd8..83901763 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -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;
}

Privacy Policy