Allow direct access to the dirfd of a directory handle
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 5 May 2019 22:47:26 +0000 (18:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 19:58:24 +0000 (15:58 -0400)
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>
src/common/compat/directory-handle.h

index fbdc19179e594aa358ec12564b46cdc7aae999fc..605c3dc814743e3ab43a3d206f4f87436a9b7da6 100644 (file)
 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;
This page took 0.027471 seconds and 5 git commands to generate.