logging: strip down and clean `log.h` and `log.c`
[babeltrace.git] / src / plugins / ctf / fs-src / fs.cpp
index 0118efbdaec4ecdd0b7e56618269f294faf07861..86b4c45ba636b19dc33abc8d9bf8f1425a1d6760 100644 (file)
@@ -7,27 +7,30 @@
  * Babeltrace CTF file system Reader Component
  */
 
+#include <glib.h>
+#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP self_comp
-#define BT_LOG_OUTPUT_LEVEL   log_level
+#define BT_LOG_OUTPUT_LEVEL   ((enum bt_log_level) log_level)
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS"
 #include "logging/comp-logging.h"
 
+#include "common/assert.h"
 #include "common/common.h"
-#include <babeltrace2/babeltrace.h>
 #include "common/uuid.h"
-#include <glib.h>
-#include "common/assert.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "fs.hpp"
-#include "metadata.hpp"
-#include "data-stream-file.hpp"
-#include "file.hpp"
-#include "../common/metadata/decoder.hpp"
+
+#include "plugins/common/param-validation/param-validation.h"
+
 #include "../common/metadata/ctf-meta-configure-ir-trace.hpp"
 #include "../common/msg-iter/msg-iter.hpp"
+#include "data-stream-file.hpp"
+#include "file.hpp"
+#include "fs.hpp"
+#include "metadata.hpp"
+#include "plugins/ctf/common/metadata/ctf-meta.hpp"
 #include "query.hpp"
-#include "plugins/common/param-validation/param-validation.h"
 
 struct tracer_info
 {
@@ -326,8 +329,7 @@ static void ctf_fs_trace_destroy_notifier(void *data)
     ctf_fs_trace_destroy(trace);
 }
 
-struct ctf_fs_component *ctf_fs_component_create(bt_logging_level log_level,
-                                                 bt_self_component *)
+struct ctf_fs_component *ctf_fs_component_create(bt_logging_level log_level)
 {
     struct ctf_fs_component *ctf_fs;
 
@@ -403,7 +405,6 @@ gchar *ctf_fs_make_port_name(struct ctf_fs_ds_file_group *ds_file_group)
 }
 
 static int create_one_port_for_trace(struct ctf_fs_component *ctf_fs,
-                                     struct ctf_fs_trace *,
                                      struct ctf_fs_ds_file_group *ds_file_group,
                                      bt_self_component_source *self_comp_src)
 {
@@ -461,7 +462,7 @@ static int create_ports_for_trace(struct ctf_fs_component *ctf_fs,
         struct ctf_fs_ds_file_group *ds_file_group =
             (struct ctf_fs_ds_file_group *) g_ptr_array_index(ctf_fs_trace->ds_file_groups, i);
 
-        ret = create_one_port_for_trace(ctf_fs, ctf_fs_trace, ds_file_group, self_comp_src);
+        ret = create_one_port_for_trace(ctf_fs, ds_file_group, self_comp_src);
         if (ret) {
             BT_COMP_LOGE_APPEND_CAUSE(self_comp, "Cannot create output port.");
             goto end;
@@ -2258,7 +2259,7 @@ static struct ctf_fs_component *ctf_fs_create(const bt_value *params,
     bt_self_component *self_comp = bt_self_component_source_as_self_component(self_comp_src);
 
     ctf_fs = ctf_fs_component_create(
-        bt_component_get_logging_level(bt_self_component_as_component(self_comp)), self_comp);
+        bt_component_get_logging_level(bt_self_component_as_component(self_comp)));
     if (!ctf_fs) {
         goto error;
     }
@@ -2294,9 +2295,9 @@ end:
     return ctf_fs;
 }
 
-bt_component_class_initialize_method_status
-ctf_fs_init(bt_self_component_source *self_comp_src, bt_self_component_source_configuration *,
-            const bt_value *params, void *)
+bt_component_class_initialize_method_status ctf_fs_init(bt_self_component_source *self_comp_src,
+                                                        bt_self_component_source_configuration *,
+                                                        const bt_value *params, void *)
 {
     struct ctf_fs_component *ctf_fs;
     bt_component_class_initialize_method_status ret =
This page took 0.025344 seconds and 4 git commands to generate.