return fstatat(handle->dirfd, path, st, 0);
}
+LTTNG_HIDDEN
+bool lttng_directory_handle_uses_fd(
+ const struct lttng_directory_handle *handle)
+{
+ return handle->dirfd != AT_FDCWD;
+}
+
static
int lttng_directory_handle_mkdir(
const struct lttng_directory_handle *handle,
return ret;
}
+LTTNG_HIDDEN
+bool lttng_directory_handle_uses_fd(
+ const struct lttng_directory_handle *handle)
+{
+ return false;
+}
+
static
int lttng_directory_handle_mkdir(const struct lttng_directory_handle *handle,
const char *subdirectory, mode_t mode)
const char *name,
struct stat *stat_buf);
+/*
+ * Returns true if this directory handle is backed by a file
+ * descriptor, false otherwise.
+ */
+LTTNG_HIDDEN
+bool lttng_directory_handle_uses_fd(
+ const struct lttng_directory_handle *handle);
+
/*
* Compare two directory handles.
*