From: Mathieu Desnoyers Date: Mon, 19 Sep 2011 20:59:23 +0000 (-0400) Subject: Prefix all field names with underscores X-Git-Tag: v1.9.1~202 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4e2ee1f5ad0b837440f3b850e971f25db209cca1;p=lttng-ust.git Prefix all field names with underscores Don't clash with CTF reserved words. Signed-off-by: Mathieu Desnoyers --- diff --git a/libust/ltt-events.c b/libust/ltt-events.c index 325fe1d0..8f21d458 100644 --- a/libust/ltt-events.c +++ b/libust/ltt-events.c @@ -549,7 +549,7 @@ int _ltt_field_statedump(struct ltt_session *session, switch (field->type.atype) { case atype_integer: ret = lttng_metadata_printf(session, - " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } %s;\n", + " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } _%s;\n", field->type.u.basic.integer.size, field->type.u.basic.integer.alignment, field->type.u.basic.integer.signedness, @@ -568,7 +568,7 @@ int _ltt_field_statedump(struct ltt_session *session, break; case atype_float: ret = lttng_metadata_printf(session, - " floating_point { exp_dig = %u; mant_dig = %u; align = %u; } %s;\n", + " floating_point { exp_dig = %u; mant_dig = %u; align = %u; } _%s;\n", field->type.u.basic._float.exp_dig, field->type.u.basic._float.mant_dig, field->type.u.basic._float.alignment, @@ -591,7 +591,7 @@ int _ltt_field_statedump(struct ltt_session *session, elem_type = &field->type.u.array.elem_type; ret = lttng_metadata_printf(session, - " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } %s[%u];\n", + " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } _%s[%u];\n", elem_type->u.basic.integer.size, elem_type->u.basic.integer.alignment, elem_type->u.basic.integer.signedness, @@ -637,7 +637,7 @@ int _ltt_field_statedump(struct ltt_session *session, return ret; ret = lttng_metadata_printf(session, - " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } %s[ __%s_length ];\n", + " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } _%s[ __%s_length ];\n", elem_type->u.basic.integer.size, (unsigned int) elem_type->u.basic.integer.alignment, elem_type->u.basic.integer.signedness, @@ -660,7 +660,7 @@ int _ltt_field_statedump(struct ltt_session *session, case atype_string: /* Default encoding is UTF8 */ ret = lttng_metadata_printf(session, - " string%s %s;\n", + " string%s _%s;\n", field->type.u.basic.string.encoding == lttng_encode_ASCII ? " { encoding = ASCII; }" : "", field->name);