goto end;
}
- writer_clock_class = bt_ctf_clock_class_create(name);
+ writer_clock_class = bt_ctf_clock_class_create(name,
+ bt_ctf_clock_class_get_frequency(clock_class));
if (!writer_clock_class) {
fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__,
__LINE__);
}
}
- u64_ret = bt_ctf_clock_class_get_frequency(clock_class);
- if (u64_ret == -1ULL) {
- fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__,
- __LINE__);
- goto end_destroy;
- }
- int_ret = bt_ctf_clock_class_set_frequency(writer_clock_class, u64_ret);
- if (int_ret != 0) {
- fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__,
- __LINE__);
- goto end_destroy;
- }
-
u64_ret = bt_ctf_clock_class_get_precision(clock_class);
if (u64_ret == -1ULL) {
fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__,
struct bt_ctf_field_type *header_type = NULL;
enum bt_ctf_byte_order order;
const char *trace_name;
+ const unsigned char *trace_uuid;
field_count = bt_ctf_trace_get_environment_field_count(trace);
for (i = 0; i < field_count; i++) {
}
}
+ trace_uuid = bt_ctf_trace_get_uuid(trace);
+ if (trace_uuid) {
+ int_ret = bt_ctf_trace_set_uuid(writer_trace, trace_uuid);
+ if (int_ret < 0) {
+ fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__, __LINE__);
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+ }
+
end:
return ret;
}