fix: move lttng_close_on_exec to proper wrapper
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 24 Feb 2020 20:15:36 +0000 (15:15 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 24 Feb 2020 21:52:02 +0000 (16:52 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I330c6d63fc9c1af00c9a9471563d322d036b9a9c

lttng-statedump-impl.c
wrapper/fdtable.h
wrapper/time.h [deleted file]

index fb609e34edecf3c51f2572cc101ace8c27eef87a..2828b1908d75d684aef7e6f9e7b10a1ea7987856 100644 (file)
@@ -41,7 +41,6 @@
 #include <linux/inetdevice.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/fdtable.h>
 #include <linux/swap.h>
 #include <linux/wait.h>
 #include <linux/mutex.h>
@@ -56,7 +55,7 @@
 #include <wrapper/tracepoint.h>
 #include <wrapper/genhd.h>
 #include <wrapper/file.h>
-#include <wrapper/time.h>
+#include <wrapper/fdtable.h>
 
 #ifdef CONFIG_LTTNG_HAS_LIST_IRQ
 #include <linux/irq.h>
index 7e74290e94c7ff5b8c1a4f38a1cad05c9e930eaf..69ff4aa3fc316830c5b6b353e704dde6e6be96cf 100644 (file)
@@ -41,4 +41,21 @@ int lttng_iterate_fd(struct files_struct *files,
 #define lttng_iterate_fd       iterate_fd
 
 #endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+
+static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
+{
+       return close_on_exec(fd, fdt);
+}
+
+#else
+
+static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
+{
+       return FD_ISSET(fd, fdt->close_on_exec);
+}
+
+#endif
+
 #endif /* _LTTNG_WRAPPER_FDTABLE_H */
diff --git a/wrapper/time.h b/wrapper/time.h
deleted file mode 100644 (file)
index f33791f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _LTTNG_WRAPPER_TIME_H
-#define _LTTNG_WRAPPER_TIME_H
-
-/*
- * wrapper/time.h
- *
- * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@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; only
- * 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 <linux/version.h>
-#include <linux/time.h>
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
-
-static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
-{
-       return close_on_exec(fd, fdt);
-}
-
-#else
-
-static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
-{
-       return FD_ISSET(fd, fdt->close_on_exec);
-}
-
-#endif
-
-#endif /* _LTTNG_WRAPPER_TIME_H */
This page took 0.026474 seconds and 4 git commands to generate.