[BT_CTF_TYPE_ID_STRING] = bt_ctf_field_type_string_compare,
};
+static
+int bt_ctf_field_type_integer_validate(struct bt_ctf_field_type *);
static
int bt_ctf_field_type_enumeration_validate(struct bt_ctf_field_type *);
static
static
int (* const type_validate_funcs[])(struct bt_ctf_field_type *) = {
- [BT_CTF_TYPE_ID_INTEGER] = NULL,
+ [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_validate,
[BT_CTF_TYPE_ID_FLOAT] = NULL,
[BT_CTF_TYPE_ID_STRING] = NULL,
[BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_validate,
type_destroy_funcs[type_id](type);
}
+static
+int bt_ctf_field_type_integer_validate(struct bt_ctf_field_type *type)
+{
+ int ret = 0;
+
+ struct bt_ctf_field_type_integer *integer =
+ container_of(type, struct bt_ctf_field_type_integer,
+ parent);
+
+ if (integer->mapped_clock && integer->declaration.signedness) {
+ ret = -1;
+ goto end;
+ }
+
+end:
+ return ret;
+}
+
static
int bt_ctf_field_type_enumeration_validate(struct bt_ctf_field_type *type)
{