From: Michael Jeanson Date: Fri, 18 Nov 2022 22:15:27 +0000 (-0500) Subject: Drop support for kernels < 4.4 from ns contexts X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=455d6bcc7c93a75c555c340fd8ab6c00edf68551;p=lttng-modules.git Drop support for kernels < 4.4 from ns contexts Change-Id: Ie10299af93193415adfafeccb1c59c4b8c0a0bc0 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/src/lttng-context-ipc-ns.c b/src/lttng-context-ipc-ns.c index e6d662bb..28108a0f 100644 --- a/src/lttng-context-ipc-ns.c +++ b/src/lttng-context-ipc-ns.c @@ -9,6 +9,8 @@ * */ +#ifdef CONFIG_IPC_NS + #include #include #include @@ -19,9 +21,6 @@ #include #include -#if defined(CONFIG_IPC_NS) && \ - (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) - static size_t ipc_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { diff --git a/src/lttng-context-mnt-ns.c b/src/lttng-context-mnt-ns.c index cc41dc7d..c4bf5593 100644 --- a/src/lttng-context-mnt-ns.c +++ b/src/lttng-context-mnt-ns.c @@ -9,6 +9,8 @@ * */ +#ifndef LTTNG_MNT_NS_MISSING_HEADER + #include #include #include @@ -19,9 +21,6 @@ #include #include -#if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \ - (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) - #include <../fs/mount.h> static diff --git a/src/lttng-context-net-ns.c b/src/lttng-context-net-ns.c index 4bc046db..ad6d6d2a 100644 --- a/src/lttng-context-net-ns.c +++ b/src/lttng-context-net-ns.c @@ -9,6 +9,8 @@ * */ +#ifdef CONFIG_NET_NS + #include #include #include @@ -20,9 +22,6 @@ #include #include -#if defined(CONFIG_NET_NS) && \ - (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) - static size_t net_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { diff --git a/src/lttng-context-pid-ns.c b/src/lttng-context-pid-ns.c index fa66b1dd..7458ed32 100644 --- a/src/lttng-context-pid-ns.c +++ b/src/lttng-context-pid-ns.c @@ -9,6 +9,8 @@ * */ +#ifdef CONFIG_PID_NS + #include #include #include @@ -19,9 +21,6 @@ #include #include -#if defined(CONFIG_PID_NS) && \ - (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) - static size_t pid_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { diff --git a/src/lttng-context-user-ns.c b/src/lttng-context-user-ns.c index ab9afa4e..f7ee3f91 100644 --- a/src/lttng-context-user-ns.c +++ b/src/lttng-context-user-ns.c @@ -9,6 +9,8 @@ * */ +#ifdef CONFIG_USER_NS + #include #include #include @@ -19,9 +21,6 @@ #include #include -#if defined(CONFIG_USER_NS) && \ - (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) - static size_t user_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { diff --git a/src/lttng-context-uts-ns.c b/src/lttng-context-uts-ns.c index 455b1603..ca0c58fc 100644 --- a/src/lttng-context-uts-ns.c +++ b/src/lttng-context-uts-ns.c @@ -9,6 +9,8 @@ * */ +#ifdef CONFIG_UTS_NS + #include #include #include @@ -19,9 +21,6 @@ #include #include -#if defined(CONFIG_UTS_NS) && \ - (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) - static size_t uts_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) {