From 07d5fff29ce96f3456cf74d740b56a46c5cba507 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 28 Dec 2021 23:29:51 +0200 Subject: v4l2: v4l2_camera_file: Store file description Create a string that describe the file from the path and file descriptor. This will be used in log messages to clearly identify which file an operation is related to. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/v4l2/v4l2_compat_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/v4l2/v4l2_compat_manager.cpp') diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp index c64cdb86..585046e9 100644 --- a/src/v4l2/v4l2_compat_manager.cpp +++ b/src/v4l2/v4l2_compat_manager.cpp @@ -156,7 +156,9 @@ int V4L2CompatManager::openat(int dirfd, const char *path, int oflag, mode_t mod return efd; V4L2CameraProxy *proxy = proxies_[ret].get(); - files_.emplace(efd, std::make_shared(efd, oflag & O_NONBLOCK, proxy)); + files_.emplace(efd, std::make_shared(dirfd, path, efd, + oflag & O_NONBLOCK, + proxy)); LOG(V4L2Compat, Debug) << "Opened " << path << " -> fd " << efd; return efd; -- cgit v1.2.1