+ order = bt_ctf_trace_get_native_byte_order(trace);
+ if (order == BT_CTF_BYTE_ORDER_UNKNOWN) {
+ fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__, __LINE__);
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+
+ ret = bt_ctf_trace_set_native_byte_order(writer_trace, order);
+ if (ret) {
+ fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__, __LINE__);
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+