UUID field should be optional, as specified by CTF spec
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-generate-io-struct.c
index 9c381c5fac8a673d23d8e3a4ca080051d2ddf209..4b399613585ebb81b9aa49d25c23583690483003 100644 (file)
@@ -1585,7 +1585,7 @@ struct declaration *ctf_type_specifier_list_visit(FILE *fd,
 }
 
 static
-int ctf_event_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_event *event, struct ctf_trace *trace)
+int ctf_event_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_event_declaration *event, struct ctf_trace *trace)
 {
        int ret = 0;
 
@@ -1741,9 +1741,9 @@ int ctf_event_visit(FILE *fd, int depth, struct ctf_node *node,
 {
        int ret = 0;
        struct ctf_node *iter;
-       struct ctf_event *event;
+       struct ctf_event_declaration *event;
 
-       event = g_new0(struct ctf_event, 1);
+       event = g_new0(struct ctf_event_declaration, 1);
        event->declaration_scope = new_declaration_scope(parent_declaration_scope);
        event->loglevel = -1;
        bt_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
@@ -2143,11 +2143,6 @@ int ctf_trace_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_trace
                fprintf(fd, "[error] %s: missing minor field in trace declaration\n", __func__);
                goto error;
        }
-       if (!CTF_TRACE_FIELD_IS_SET(trace, uuid)) {
-               ret = -EPERM;
-               fprintf(fd, "[error] %s: missing uuid field in trace declaration\n", __func__);
-               goto error;
-       }
        if (!CTF_TRACE_FIELD_IS_SET(trace, byte_order)) {
                ret = -EPERM;
                fprintf(fd, "[error] %s: missing byte_order field in trace declaration\n", __func__);
This page took 0.02297 seconds and 4 git commands to generate.