From: Mathieu Desnoyers Date: Tue, 5 Jul 2016 17:10:11 +0000 (-0400) Subject: Communication protocol: use fixed-size integer rather than enum X-Git-Tag: v2.9.0-rc1~50 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=735ea6a81120f85d94666245f24aac233519568e;p=lttng-ust.git Communication protocol: use fixed-size integer rather than enum Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index 08122a79..20178234 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -309,7 +309,7 @@ struct ustctl_integer_type { uint32_t signedness; uint32_t reverse_byte_order; uint32_t base; /* 2, 8, 10, 16, for pretty print */ - enum ustctl_string_encodings encoding; + int32_t encoding; /* enum ustctl_string_encodings */ uint16_t alignment; /* in bits */ char padding[USTCTL_UST_INTEGER_TYPE_PADDING]; } LTTNG_PACKED; @@ -346,7 +346,7 @@ union _ustctl_basic_type { uint64_t id; /* enum ID in sessiond. */ } enumeration; struct { - enum ustctl_string_encodings encoding; + int32_t encoding; /* enum ustctl_string_encodings */ } string; struct ustctl_float_type _float; char padding[USTCTL_UST_BASIC_TYPE_PADDING]; diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index ecc23821..4e9de57b 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -766,7 +766,7 @@ ssize_t count_ctx_fields_recursive(size_t nr_fields, } static -int serialize_string_encoding(enum ustctl_string_encodings *ue, +int serialize_string_encoding(int32_t *ue, enum lttng_string_encodings le) { switch (le) {