summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_compat_manager.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-28 23:36:03 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-01-14 14:02:49 +0200
commit61670bb338dd4441b9d9dffdcd8849c2305eb4f3 (patch)
tree20dad79c2c39d3712b20c95c04440bcc93022b41 /src/v4l2/v4l2_compat_manager.cpp
parentfc96573697fddabd951483b902caaa41adb31214 (diff)
v4l2: v4l2_camera_proxy: Use file description in debug messages
Debug messages in V4L2CameraProxy print the numerical file descriptor, which isn't very human-friendly. Replace it with the V4L2CameraFile description that includes the full path. While at it, refactor the messages to use __func__ instead of manually copying function names. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_compat_manager.cpp')
-rw-r--r--src/v4l2/v4l2_compat_manager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
index ded568be..0f7575c5 100644
--- a/src/v4l2/v4l2_compat_manager.cpp
+++ b/src/v4l2/v4l2_compat_manager.cpp
@@ -194,7 +194,8 @@ void *V4L2CompatManager::mmap(void *addr, size_t length, int prot, int flags,
if (!file)
return fops_.mmap(addr, length, prot, flags, fd, offset);
- void *map = file->proxy()->mmap(addr, length, prot, flags, offset);
+ void *map = file->proxy()->mmap(file.get(), addr, length, prot, flags,
+ offset);
if (map == MAP_FAILED)
return map;
@@ -210,7 +211,7 @@ int V4L2CompatManager::munmap(void *addr, size_t length)
V4L2CameraFile *file = device->second.get();
- int ret = file->proxy()->munmap(addr, length);
+ int ret = file->proxy()->munmap(file, addr, length);
if (ret < 0)
return ret;