Rename "tsc" to "timestamp"
[lttng-modules.git] / src / lttng-context-uts-ns.c
index 1c34ae212b24bb001cb817e375585b3f5b2afc68..ca0c58fc11e01681aa3d9d4d656afc478362bddf 100644 (file)
@@ -9,6 +9,8 @@
  *
  */
 
+#ifdef CONFIG_UTS_NS
+
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <lttng/events-internal.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <wrapper/namespace.h>
 #include <lttng/tracer.h>
 
-#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)
 {
@@ -48,7 +46,7 @@ void uts_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx,
         * namespaces, just dereference the pointers.
         */
        if (current->nsproxy)
-               uts_ns_inum = current->nsproxy->uts_ns->lttng_ns_inum;
+               uts_ns_inum = current->nsproxy->uts_ns->ns.inum;
 
        chan->ops->event_write(ctx, &uts_ns_inum, sizeof(uts_ns_inum), lttng_alignof(uts_ns_inum));
 }
@@ -68,7 +66,7 @@ void uts_ns_get_value(void *priv,
         * namespaces, just dereference the pointers.
         */
        if (current->nsproxy)
-               uts_ns_inum = current->nsproxy->uts_ns->lttng_ns_inum;
+               uts_ns_inum = current->nsproxy->uts_ns->ns.inum;
 
        value->u.s64 = uts_ns_inum;
 }
@@ -76,7 +74,7 @@ void uts_ns_get_value(void *priv,
 static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field(
        lttng_kernel_static_event_field("uts_ns",
                lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10),
-               false, false, false),
+               false, false),
        uts_ns_get_size,
        uts_ns_record,
        uts_ns_get_value,
This page took 0.024612 seconds and 4 git commands to generate.