X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-uts-ns.c;h=a6dbddf04275f433362fe74b6393978b867b0577;hb=dd16bde78d5a6f2aee74cba38fe75f1d7922669c;hp=7352a3df832a426f9227d280a3e347e724a35765;hpb=a6cf40a4491954d6f81052f8bbce757f73727f16;p=lttng-modules.git diff --git a/lttng-context-uts-ns.c b/lttng-context-uts-ns.c index 7352a3df..a6dbddf0 100644 --- a/lttng-context-uts-ns.c +++ b/lttng-context-uts-ns.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) * * lttng-context-uts-ns.c * @@ -15,12 +15,9 @@ #include #include #include -#include -#include #include -#if defined(CONFIG_UTS_NS) && \ - (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) +#if defined(CONFIG_UTS_NS) static size_t uts_ns_get_size(size_t offset) @@ -47,7 +44,7 @@ void uts_ns_record(struct lttng_ctx_field *field, * 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; lib_ring_buffer_align_ctx(ctx, lttng_alignof(uts_ns_inum)); chan->ops->event_write(ctx, &uts_ns_inum, sizeof(uts_ns_inum)); @@ -68,7 +65,7 @@ void uts_ns_get_value(struct lttng_ctx_field *field, * 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->s64 = uts_ns_inum; } @@ -86,17 +83,16 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx) } field->event_field.name = "uts_ns"; field->event_field.type.atype = atype_integer; - field->event_field.type.u.basic.integer.size = sizeof(unsigned int) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = lttng_alignof(unsigned int) * CHAR_BIT; - field->event_field.type.u.basic.integer.signedness = lttng_is_signed_type(unsigned int); - field->event_field.type.u.basic.integer.reverse_byte_order = 0; - field->event_field.type.u.basic.integer.base = 10; - field->event_field.type.u.basic.integer.encoding = lttng_encode_none; + field->event_field.type.u.integer.size = sizeof(unsigned int) * CHAR_BIT; + field->event_field.type.u.integer.alignment = lttng_alignof(unsigned int) * CHAR_BIT; + field->event_field.type.u.integer.signedness = lttng_is_signed_type(unsigned int); + field->event_field.type.u.integer.reverse_byte_order = 0; + field->event_field.type.u.integer.base = 10; + field->event_field.type.u.integer.encoding = lttng_encode_none; field->get_size = uts_ns_get_size; field->record = uts_ns_record; field->get_value = uts_ns_get_value; lttng_context_update(*ctx); - wrapper_vmalloc_sync_all(); return 0; } EXPORT_SYMBOL_GPL(lttng_add_uts_ns_to_ctx);