From 735ea6a81120f85d94666245f24aac233519568e Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 5 Jul 2016 13:10:11 -0400 Subject: [PATCH] Communication protocol: use fixed-size integer rather than enum Signed-off-by: Mathieu Desnoyers --- include/lttng/ust-ctl.h | 4 ++-- liblttng-ust-comm/lttng-ust-comm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.34.1