ret = enumeration->entries->len ? 0 : -1;
break;
}
+ case CTF_TYPE_SEQUENCE:
+ {
+ struct bt_ctf_field_type_sequence *sequence =
+ container_of(type, struct bt_ctf_field_type_sequence,
+ parent);
+
+ /* length field name should be set at this point */
+ ret = sequence->length_field_name->len ? 0 : -1;
+ break;
+ }
+ case CTF_TYPE_VARIANT:
+ {
+ struct bt_ctf_field_type_variant *variant =
+ container_of(type, struct bt_ctf_field_type_variant,
+ parent);
+
+ if (variant->tag_name->len == 0 || !variant->tag) {
+ ret = -1;
+ }
+ break;
+ }
default:
break;
}
goto end;
}
- type_id = type->declaration->id;
switch (byte_order) {
case BT_CTF_BYTE_ORDER_NATIVE:
/* Leave unset. Will be initialized by parent. */
goto end;
}
+ type_id = type->declaration->id;
if (set_byte_order_funcs[type_id]) {
set_byte_order_funcs[type_id](type, internal_byte_order, 0);
}