From 61670bb338dd4441b9d9dffdcd8849c2305eb4f3 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 28 Dec 2021 23:36:03 +0200 Subject: 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 Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/v4l2/v4l2_compat_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (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 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; -- cgit v1.2.1