From 8e18f8d45fb61977926a3395b1963028bab258f9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 2 Sep 2021 02:49:16 +0300 Subject: libcamera: file_descriptor: Add a function to retrieve the inode The inode is useful to check if two file descriptors refer to the same file. Add a function to retrieve it. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jean-Michel Hautbois Reviewed-by: Paul Elder Reviewed-by: Hirokazu Honda --- include/libcamera/file_descriptor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/libcamera/file_descriptor.h b/include/libcamera/file_descriptor.h index d514aac7..988f9b7a 100644 --- a/include/libcamera/file_descriptor.h +++ b/include/libcamera/file_descriptor.h @@ -8,6 +8,7 @@ #define __LIBCAMERA_FILE_DESCRIPTOR_H__ #include +#include namespace libcamera { @@ -27,6 +28,8 @@ public: int fd() const { return fd_ ? fd_->fd() : -1; } FileDescriptor dup() const; + ino_t inode() const; + private: class Descriptor { -- cgit v1.2.1