Remove all code that depends on trace collection directory structure
[babeltrace.git] / formats / ctf-text / ctf-text.c
index 150cf3a5c8124c9da3b59f7fd641493a9623362e..81dbb3eb159ef0b423ea09696c086726ce5272f7 100644 (file)
@@ -56,8 +56,7 @@ enum field_item {
        ITEM_PAYLOAD,
 };
 
-struct trace_descriptor *ctf_text_open_trace(const char *collection_path,
-               const char *path, int flags,
+struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
                void (*move_pos_slow)(struct ctf_stream_pos *pos, size_t offset,
                        int whence), FILE *metadata_fp);
 void ctf_text_close_trace(struct trace_descriptor *descriptor);
@@ -248,36 +247,36 @@ int ctf_text_write_event(struct stream_pos *ppos,
                else
                        fprintf(pos->fp, " ");
        }
-       if ((opt_trace_domain_field && !opt_all_fields) && stream_class->trace->domain[0] != '\0') {
+       if ((opt_trace_domain_field && !opt_all_fields) && stream_class->trace->env.domain[0] != '\0') {
                set_field_names_print(pos, ITEM_HEADER);
                if (pos->print_names) {
                        fprintf(pos->fp, "trace:domain = ");
                }
-               fprintf(pos->fp, "%s", stream_class->trace->domain);
+               fprintf(pos->fp, "%s", stream_class->trace->env.domain);
                if (pos->print_names)
                        fprintf(pos->fp, ", ");
                dom_print = 1;
        }
-       if ((opt_trace_procname_field && !opt_all_fields) && stream_class->trace->procname[0] != '\0') {
+       if ((opt_trace_procname_field && !opt_all_fields) && stream_class->trace->env.procname[0] != '\0') {
                set_field_names_print(pos, ITEM_HEADER);
                if (pos->print_names) {
                        fprintf(pos->fp, "trace:procname = ");
                } else if (dom_print) {
                        fprintf(pos->fp, ":");
                }
-               fprintf(pos->fp, "%s", stream_class->trace->procname);
+               fprintf(pos->fp, "%s", stream_class->trace->env.procname);
                if (pos->print_names)
                        fprintf(pos->fp, ", ");
                dom_print = 1;
        }
-       if ((opt_trace_vpid_field && !opt_all_fields) && stream_class->trace->vpid[0] != '\0') {
+       if ((opt_trace_vpid_field && !opt_all_fields) && stream_class->trace->env.vpid != -1) {
                set_field_names_print(pos, ITEM_HEADER);
                if (pos->print_names) {
                        fprintf(pos->fp, "trace:vpid = ");
                } else if (dom_print) {
                        fprintf(pos->fp, ":");
                }
-               fprintf(pos->fp, "%s", stream_class->trace->vpid);
+               fprintf(pos->fp, "%d", stream_class->trace->env.vpid);
                if (pos->print_names)
                        fprintf(pos->fp, ", ");
                dom_print = 1;
@@ -397,8 +396,7 @@ error:
 }
 
 
-struct trace_descriptor *ctf_text_open_trace(const char *collection_path,
-               const char *path, int flags,
+struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
                void (*move_pos_slow)(struct ctf_stream_pos *pos, size_t offset,
                        int whence), FILE *metadata_fp)
 {
This page took 0.02416 seconds and 4 git commands to generate.