Tests: flt.lttng-utils.debug-info: update debug-info tests
[babeltrace.git] / src / plugins / ctf / fs-src / fs.c
index 4ad1853927948fd93fac81f89724257951a9b17b..d9493e6639e290170642bd2b9dc2dbc352392247 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "common/common.h"
 #include <babeltrace2/babeltrace.h>
-#include "compat/uuid.h"
+#include "common/uuid.h"
 #include <glib.h>
 #include "common/assert.h"
 #include <inttypes.h>
@@ -427,9 +427,9 @@ gchar *ctf_fs_make_port_name(struct ctf_fs_ds_file_group *ds_file_group)
 
        /* For the trace, use the uuid if present, else the path. */
        if (ds_file_group->ctf_fs_trace->metadata->tc->is_uuid_set) {
-               char uuid_str[BABELTRACE_UUID_STR_LEN];
+               char uuid_str[BT_UUID_STR_LEN + 1];
 
-               bt_uuid_unparse(ds_file_group->ctf_fs_trace->metadata->tc->uuid, uuid_str);
+               bt_uuid_to_str(ds_file_group->ctf_fs_trace->metadata->tc->uuid, uuid_str);
                g_string_assign(name, uuid_str);
        } else {
                g_string_assign(name, ds_file_group->ctf_fs_trace->path->str);
@@ -496,9 +496,7 @@ error:
        ret = -1;
 
 end:
-       if (port_name) {
-               g_free(port_name);
-       }
+       g_free(port_name);
 
        port_data_destroy(port_data);
        return ret;
@@ -901,7 +899,7 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace)
        while ((basename = g_dir_read_name(dir))) {
                struct ctf_fs_file *file;
 
-               if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) {
+               if (strcmp(basename, CTF_FS_METADATA_FILENAME) == 0) {
                        /* Ignore the metadata stream. */
                        BT_COMP_LOGI("Ignoring metadata file `%s" G_DIR_SEPARATOR_S "%s`",
                                ctf_fs_trace->path->str, basename);
@@ -1580,7 +1578,7 @@ int merge_ctf_fs_traces(struct ctf_fs_trace **traces, unsigned int num_traces)
        struct ctf_fs_trace *winner;
        guint i;
        int ret = 0;
-       char uuid_str[BABELTRACE_UUID_STR_LEN];
+       char uuid_str[BT_UUID_STR_LEN + 1];
 
        BT_ASSERT(num_traces >= 2);
 
@@ -1626,7 +1624,7 @@ int merge_ctf_fs_traces(struct ctf_fs_trace **traces, unsigned int num_traces)
        }
 
        /* Use the string representation of the UUID as the trace name. */
-       bt_uuid_unparse(winner->metadata->tc->uuid, uuid_str);
+       bt_uuid_to_str(winner->metadata->tc->uuid, uuid_str);
        g_string_printf(winner->name, "%s", uuid_str);
 
 end:
@@ -1999,10 +1997,10 @@ bt_component_class_query_method_status ctf_fs_query(
        bt_component_class_query_method_status status =
                BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_OK;
 
-       if (!strcmp(object, "metadata-info")) {
+       if (strcmp(object, "metadata-info") == 0) {
                status = metadata_info_query(comp_class, params, log_level,
                        result);
-       } else if (!strcmp(object, "trace-info")) {
+       } else if (strcmp(object, "trace-info") == 0) {
                status = trace_info_query(comp_class, params, log_level,
                        result);
        } else {
This page took 0.024502 seconds and 4 git commands to generate.