From ad8af50d86c931543590ddb7f5b4490fdfc227f4 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Sat, 3 Sep 2022 12:50:42 +0100 Subject: 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 Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/libcamera/v4l2_device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libcamera/v4l2_device.cpp') 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; } -- cgit v1.2.1