+ switch (lt->type) {
+ case lttng_ust_type_integer:
+ {
+ struct ustctl_field *uf = &fields[*iter_output];
+ struct ustctl_type *ut = &uf->type;
+
+ if (field_name) {
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
+ } else {
+ uf->name[0] = '\0';
+ }
+ ret = serialize_integer_type(&ut->u.integer, lttng_ust_get_type_integer(lt),
+ parent_encoding);
+ if (ret)
+ return ret;
+ ut->atype = ustctl_atype_integer;
+ (*iter_output)++;
+ break;
+ }
+ case lttng_ust_type_float:
+ {
+ struct ustctl_field *uf = &fields[*iter_output];
+ struct ustctl_type *ut = &uf->type;
+ struct ustctl_float_type *uft;
+ struct lttng_ust_type_float *lft;
+
+ if (field_name) {
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
+ } else {
+ uf->name[0] = '\0';
+ }
+ uft = &ut->u._float;
+ lft = lttng_ust_get_type_float(lt);
+ uft->exp_dig = lft->exp_dig;
+ uft->mant_dig = lft->mant_dig;
+ uft->alignment = lft->alignment;
+ uft->reverse_byte_order = lft->reverse_byte_order;
+ ut->atype = ustctl_atype_float;
+ (*iter_output)++;
+ break;
+ }
+ case lttng_ust_type_string:
+ {
+ struct ustctl_field *uf = &fields[*iter_output];
+ struct ustctl_type *ut = &uf->type;
+ int32_t encoding;
+
+ if (field_name) {
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
+ } else {
+ uf->name[0] = '\0';
+ }
+ ret = serialize_string_encoding(&encoding, lttng_ust_get_type_string(lt)->encoding);
+ if (ret)
+ return ret;
+ ut->u.string.encoding = encoding;
+ ut->atype = ustctl_atype_string;
+ (*iter_output)++;
+ break;
+ }
+ case lttng_ust_type_array: