Serialization functions need access to the dirfd of a directory handle
in order to pass the fd and re-build the directory handle in
another process.
This function should not be used for other purposes. It is
also only available in the 'enable-dirfd' configuration, which
is assumed for the session daemon.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct lttng_directory_handle {
int dirfd;
};
+
+static inline
+int lttng_directory_handle_get_dirfd(
+ const struct lttng_directory_handle *handle)
+{
+ return handle->dirfd;
+}
+
#else
struct lttng_directory_handle {
char *base_path;