Fix: text output missing separator when printing the domain
[babeltrace.git] / formats / ctf-text / ctf-text.c
index 008762339fdef48d861aca994d5a1f6661fcae40..0fc456ad7152bd3a7aede7f1da6ca2c5b53ce5cb 100644 (file)
@@ -31,7 +31,7 @@
 #include <babeltrace/ctf/metadata.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/ctf/events-internal.h>
-#include <babeltrace/trace-debuginfo.h>
+#include <babeltrace/trace-debug-info.h>
 #include <inttypes.h>
 #include <sys/mman.h>
 #include <errno.h>
@@ -60,7 +60,8 @@ int opt_all_field_names,
        opt_loglevel_field,
        opt_emf_field,
        opt_callsite_field,
-       opt_delta_field = 1;
+       opt_delta_field = 1,
+       opt_debug_info_full_path;
 
 enum field_item {
        ITEM_SCOPE,
@@ -341,6 +342,8 @@ int ctf_text_write_event(struct bt_stream_pos *ppos, struct ctf_stream_definitio
                set_field_names_print(pos, ITEM_HEADER);
                if (pos->print_names) {
                        fprintf(pos->fp, "trace:domain = ");
+               } else if (dom_print) {
+                       fprintf(pos->fp, ":");
                }
                fprintf(pos->fp, "%s", stream_class->trace->env.domain);
                if (pos->print_names)
@@ -546,6 +549,10 @@ struct bt_trace_descriptor *ctf_text_open_trace(const char *path, int flags,
        FILE *fp;
 
        pos = g_new0(struct ctf_text_stream_pos, 1);
+       if (!pos) {
+               goto error;
+       }
+       init_trace_descriptor(&pos->trace_descriptor);
 
        pos->last_real_timestamp = -1ULL;
        pos->last_cycles_timestamp = -1ULL;
This page took 0.02362 seconds and 4 git commands to generate.