UUID field should be optional, as specified by CTF spec
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-generate-io-struct.c
index 119114c0377a8d153d409ad973a9c75389d34df4..4b399613585ebb81b9aa49d25c23583690483003 100644 (file)
@@ -240,7 +240,7 @@ int get_unary_uuid(struct bt_list_head *head, unsigned char *uuid)
 }
 
 static
-struct ctf_stream_class *trace_stream_lookup(struct ctf_trace *trace, uint64_t stream_id)
+struct ctf_stream_declaration *trace_stream_lookup(struct ctf_trace *trace, uint64_t stream_id)
 {
        if (trace->streams->len <= stream_id)
                return NULL;
@@ -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) {
@@ -1801,7 +1801,7 @@ error:
 
  
 static
-int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_stream_class *stream, struct ctf_trace *trace)
+int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_stream_declaration *stream, struct ctf_trace *trace)
 {
        int ret = 0;
 
@@ -1927,9 +1927,9 @@ int ctf_stream_visit(FILE *fd, int depth, struct ctf_node *node,
 {
        int ret = 0;
        struct ctf_node *iter;
-       struct ctf_stream_class *stream;
+       struct ctf_stream_declaration *stream;
 
-       stream = g_new0(struct ctf_stream_class, 1);
+       stream = g_new0(struct ctf_stream_declaration, 1);
        stream->declaration_scope = new_declaration_scope(parent_declaration_scope);
        stream->events_by_id = g_ptr_array_new();
        stream->event_quark_to_id = g_hash_table_new(g_direct_hash, g_direct_equal);
@@ -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.023714 seconds and 4 git commands to generate.