Change UUID API prefix from babeltrace_ to bt_
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Oct 2015 20:36:56 +0000 (16:36 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 16 Oct 2015 19:40:27 +0000 (15:40 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
compat/compat_uuid.c
converter/babeltrace-log.c
formats/ctf/ctf.c
formats/ctf/metadata/ctf-visitor-generate-io-struct.c
include/babeltrace/compat/uuid.h

index 6216f7994cb97f6750607be3c6ba04a223f3633e..a775da47b5c7f0388602f374c614640ac7b6d88b 100644 (file)
@@ -48,7 +48,7 @@ void fix_uuid_endian(unsigned char * ptr)
        swap(ptr, 6, 7)
 }
 
-int babeltrace_uuid_generate(unsigned char *uuid_out)
+int bt_uuid_generate(unsigned char *uuid_out)
 {
        RPC_STATUS status;
 
@@ -59,7 +59,7 @@ int babeltrace_uuid_generate(unsigned char *uuid_out)
                return -1;
 }
 
-int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out)
+int bt_uuid_unparse(const unsigned char *uuid_in, char *str_out)
 {
        RPC_STATUS status;
        unsigned char *alloc_str;
@@ -83,7 +83,7 @@ int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out)
        return ret;
 }
 
-int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out)
+int bt_uuid_parse(const char *str_in, unsigned char *uuid_out)
 {
        RPC_STATUS status;
 
@@ -97,7 +97,7 @@ int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out)
                return -1;
 }
 
-int babeltrace_uuid_compare(const unsigned char *uuid_a,
+int bt_uuid_compare(const unsigned char *uuid_a,
                const unsigned char *uuid_b)
 {
        RPC_STATUS status;
index c6f751ea4d97b7353dd44341608ba1377a7007e9..b724ccd67ebd5aecbb26d671d2e858e2d978b533 100644 (file)
@@ -108,7 +108,7 @@ void print_metadata(FILE *fp)
        ret = sscanf(VERSION, "%u.%u", &major, &minor);
        if (ret != 2)
                fprintf(stderr, "[warning] Incorrect babeltrace version format\n.");
-       babeltrace_uuid_unparse(s_uuid, uuid_str);
+       bt_uuid_unparse(s_uuid, uuid_str);
        fprintf(fp, metadata_fmt,
                major,
                minor,
@@ -440,7 +440,7 @@ int main(int argc, char **argv)
                goto error_closemetadatafd;
        }
 
-       babeltrace_uuid_generate(s_uuid);
+       bt_uuid_generate(s_uuid);
        print_metadata(metadata_fp);
        trace_text(stdin, fd);
 
index a32e0cc03d819f5886ef49ffe171ac95f15a5587..865e2c2e0e8e21ebddcce42c55db55f497e182c9 100644 (file)
@@ -1109,7 +1109,7 @@ int ctf_trace_metadata_packet_read(struct ctf_trace *td, FILE *in,
                memcpy(td->uuid, header.uuid, sizeof(header.uuid));
                CTF_TRACE_SET_FIELD(td, uuid);
        } else {
-               if (babeltrace_uuid_compare(header.uuid, td->uuid))
+               if (bt_uuid_compare(header.uuid, td->uuid))
                        return -EINVAL;
        }
 
@@ -1595,7 +1595,7 @@ begin:
                                elem = bt_array_index(defarray, i);
                                uuidval[i] = bt_get_unsigned_int(elem);
                        }
-                       ret = babeltrace_uuid_compare(td->uuid, uuidval);
+                       ret = bt_uuid_compare(td->uuid, uuidval);
                        if (ret) {
                                fprintf(stderr, "[error] Unique Universal Identifiers do not match.\n");
                                return -EINVAL;
index 5f47930f23a428f064b2c137152bad335867c060..4b171984d5b819888c3221d1f0b5c6873c254dda 100644 (file)
@@ -255,7 +255,7 @@ int get_unary_uuid(struct bt_list_head *head, unsigned char *uuid)
                                || i != 0)
                        return -EINVAL;
                src_string = node->u.unary_expression.u.string;
-               ret = babeltrace_uuid_parse(src_string, uuid);
+               ret = bt_uuid_parse(src_string, uuid);
        }
        return ret;
 }
@@ -2178,7 +2178,7 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                                goto error;
                        }
                        if (CTF_TRACE_FIELD_IS_SET(trace, uuid)
-                               && babeltrace_uuid_compare(uuid, trace->uuid)) {
+                               && bt_uuid_compare(uuid, trace->uuid)) {
                                fprintf(fd, "[error] %s: uuid mismatch\n", __func__);
                                ret = -EPERM;
                                goto error;
index 80e65260c25aa9dec772c2265f9120b89ce9f581..65a72704b04f9712592c7ce8bc0235a2819bc187 100644 (file)
@@ -35,7 +35,7 @@
 #include <uuid/uuid.h>
 
 static inline
-int babeltrace_uuid_generate(unsigned char *uuid_out)
+int bt_uuid_generate(unsigned char *uuid_out)
 {
        uuid_generate(uuid_out);
        return 0;
@@ -44,20 +44,20 @@ int babeltrace_uuid_generate(unsigned char *uuid_out)
 /* Sun's libuuid lacks const qualifiers */
 #if defined(__sun__)
 static inline
-int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out)
+int bt_uuid_unparse(const unsigned char *uuid_in, char *str_out)
 {
        uuid_unparse((unsigned char *) uuid_in, str_out);
        return 0;
 }
 
 static inline
-int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out)
+int bt_uuid_parse(const char *str_in, unsigned char *uuid_out)
 {
        return uuid_parse((char *) str_in, uuid_out);
 }
 
 static inline
-int babeltrace_uuid_compare(const unsigned char *uuid_a,
+int bt_uuid_compare(const unsigned char *uuid_a,
                const unsigned char *uuid_b)
 {
        return uuid_compare((unsigned char *) uuid_a,
@@ -65,34 +65,34 @@ int babeltrace_uuid_compare(const unsigned char *uuid_a,
 }
 #else
 static inline
-int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out)
+int bt_uuid_unparse(const unsigned char *uuid_in, char *str_out)
 {
        uuid_unparse(uuid_in, str_out);
        return 0;
 }
 
 static inline
-int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out)
+int bt_uuid_parse(const char *str_in, unsigned char *uuid_out)
 {
        return uuid_parse(str_in, uuid_out);
 }
 
 static inline
-int babeltrace_uuid_compare(const unsigned char *uuid_a,
+int bt_uuid_compare(const unsigned char *uuid_a,
                const unsigned char *uuid_b)
 {
        return uuid_compare(uuid_a, uuid_b);
 }
 #endif
 
-#elif defined(BABELTRACE_HAVE_LIBC_UUID)
+#elif defined(BT_HAVE_LIBC_UUID)
 #include <uuid.h>
 #include <stdint.h>
 #include <string.h>
 #include <stdlib.h>
 
 static inline
-int babeltrace_uuid_generate(unsigned char *uuid_out)
+int bt_uuid_generate(unsigned char *uuid_out)
 {
        uint32_t status;
 
@@ -104,7 +104,7 @@ int babeltrace_uuid_generate(unsigned char *uuid_out)
 }
 
 static inline
-int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out)
+int bt_uuid_unparse(const unsigned char *uuid_in, char *str_out)
 {
        uint32_t status;
        char *alloc_str;
@@ -122,7 +122,7 @@ int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out)
 }
 
 static inline
-int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out)
+int bt_uuid_parse(const char *str_in, unsigned char *uuid_out)
 {
        uint32_t status;
 
@@ -134,7 +134,7 @@ int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out)
 }
 
 static inline
-int babeltrace_uuid_compare(const unsigned char *uuid_a,
+int bt_uuid_compare(const unsigned char *uuid_a,
                const unsigned char *uuid_b)
 {
        uint32_t status;
@@ -148,10 +148,10 @@ int babeltrace_uuid_compare(const unsigned char *uuid_a,
 
 #elif defined(__MINGW32__)
 
-int babeltrace_uuid_generate(unsigned char *uuid_out);
-int babeltrace_uuid_unparse(const unsigned char *uuid_in, char *str_out);
-int babeltrace_uuid_parse(const char *str_in, unsigned char *uuid_out);
-int babeltrace_uuid_compare(const unsigned char *uuid_a,
+int bt_uuid_generate(unsigned char *uuid_out);
+int bt_uuid_unparse(const unsigned char *uuid_in, char *str_out);
+int bt_uuid_parse(const char *str_in, unsigned char *uuid_out);
+int bt_uuid_compare(const unsigned char *uuid_a,
                const unsigned char *uuid_b);
 
 #else
This page took 0.0295 seconds and 4 git commands to generate.