byte order from arch only needs to be set when not using packet metadata
[babeltrace.git] / formats / ctf / ctf.c
index 098b7eb15d7d4589880243ed7d0ecdc66c7b4152..d685b6cd70f4b9ef9362747bb7fa8862a430f086 100644 (file)
@@ -611,6 +611,8 @@ int ctf_open_trace_metadata_read(struct ctf_trace *td)
                ret = ctf_open_trace_metadata_stream_read(td, &fp, &buf);
                if (ret)
                        goto end_packet_read;
+       } else {
+               td->byte_order = BYTE_ORDER;
        }
 
        scanner = ctf_scanner_alloc(fp);
@@ -639,7 +641,7 @@ int ctf_open_trace_metadata_read(struct ctf_trace *td)
                goto end;
        }
        ret = ctf_visitor_construct_metadata(stdout, 0, &scanner->ast->root,
-                       td, BYTE_ORDER);
+                       td, td->byte_order);
        if (ret) {
                fprintf(stdout, "[error] Error in CTF metadata constructor %d\n", ret);
                goto end;
This page took 0.023856 seconds and 4 git commands to generate.