From: Philippe Proulx Date: Tue, 5 Jul 2016 21:05:21 +0000 (-0400) Subject: Fix: protocol mismatch between UST and tools X-Git-Tag: v2.9.0-rc1~100 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9d27cec717eb64195d436b44643dac65a0bf3b9a;p=lttng-tools.git Fix: protocol mismatch between UST and tools Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/lttng-ust-ctl.h b/src/bin/lttng-sessiond/lttng-ust-ctl.h index 8ee80bac4..dccb089e1 100644 --- a/src/bin/lttng-sessiond/lttng-ust-ctl.h +++ b/src/bin/lttng-sessiond/lttng-ust-ctl.h @@ -293,14 +293,18 @@ struct ustctl_enum_value { char padding[USTCTL_UST_ENUM_VALUE_PADDING]; } LTTNG_PACKED; +enum ustctl_ust_enum_entry_options { + USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0, +}; + #define USTCTL_UST_ENUM_ENTRY_PADDING 32 struct ustctl_enum_entry { struct ustctl_enum_value start, end; /* start and end are inclusive */ char string[LTTNG_UST_SYM_NAME_LEN]; union { struct { - uint8_t is_auto; - } LTTNG_PACKED options; + uint32_t options; + } LTTNG_PACKED extra; char padding[USTCTL_UST_ENUM_ENTRY_PADDING]; } u; } LTTNG_PACKED; diff --git a/src/bin/lttng-sessiond/ust-metadata.c b/src/bin/lttng-sessiond/ust-metadata.c index 328d6ea4c..d24df1943 100644 --- a/src/bin/lttng-sessiond/ust-metadata.c +++ b/src/bin/lttng-sessiond/ust-metadata.c @@ -305,7 +305,8 @@ int ust_metadata_enum_statedump(struct ust_registry_session *session, goto end; } - if (entry->u.options.is_auto) { + if (entry->u.extra.options & + USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO) { ret = lttng_metadata_printf(session, ",\n"); if (ret) { goto end;