X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-uts-ns.c;h=a6dbddf04275f433362fe74b6393978b867b0577;hb=ab257937db6125ed348885d3ba8c43b2d7a04e7a;hp=7f80bbdf04d536c19bf7f9a8b471d06039bd4136;hpb=b7cdc18250880cc44edeef4a4b42c8ac7a135a6d;p=lttng-modules.git diff --git a/lttng-context-uts-ns.c b/lttng-context-uts-ns.c index 7f80bbdf..a6dbddf0 100644 --- a/lttng-context-uts-ns.c +++ b/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);