Change CTF IR header descriptions from CTF Writer to CTF IR
[babeltrace.git] / formats / ctf / ir / clock.c
index 2a55857f0b76fb405fabcd465b9d80534ddf31c2..5ebaf046bbedc81f5e3f55a3a31cc2889be3598c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * clock.c
  *
- * Babeltrace CTF Writer
+ * Babeltrace CTF IR - Clock
  *
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
@@ -245,6 +245,34 @@ end:
        return ret;
 }
 
+const unsigned char *bt_ctf_clock_get_uuid(struct bt_ctf_clock *clock)
+{
+       const unsigned char *ret;
+
+       if (!clock) {
+               ret = NULL;
+               goto end;
+       }
+
+       ret = clock->uuid;
+end:
+       return ret;
+}
+
+int bt_ctf_clock_set_uuid(struct bt_ctf_clock *clock, const unsigned char *uuid)
+{
+       int ret = 0;
+
+       if (!clock || !uuid) {
+               ret = -1;
+               goto end;
+       }
+
+       memcpy(clock->uuid, uuid, sizeof(uuid_t));
+end:
+       return ret;
+}
+
 uint64_t bt_ctf_clock_get_time(struct bt_ctf_clock *clock)
 {
        uint64_t ret = -1ULL;
This page took 0.023582 seconds and 4 git commands to generate.