fd-tracker: refactor: extract fs_handle interface from fd_tracker
[lttng-tools.git] / src / common / fs-handle.c
diff --git a/src/common/fs-handle.c b/src/common/fs-handle.c
new file mode 100644 (file)
index 0000000..e90f06d
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2020 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <common/fs-handle.h>
+#include <common/fs-handle-internal.h>
+
+LTTNG_HIDDEN
+int fs_handle_get_fd(struct fs_handle *handle)
+{
+       return handle->get_fd(handle);
+}
+
+LTTNG_HIDDEN
+void fs_handle_put_fd(struct fs_handle *handle)
+{
+       return handle->put_fd(handle);
+}
+
+LTTNG_HIDDEN
+int fs_handle_unlink(struct fs_handle *handle)
+{
+       return handle->unlink(handle);
+}
+
+LTTNG_HIDDEN
+int fs_handle_close(struct fs_handle *handle)
+{
+       return handle->close(handle);
+}
This page took 0.025062 seconds and 4 git commands to generate.