Fix typos
[babeltrace.git] / src / plugins / ctf / fs-src / query.cpp
index af11bef51f70180e12e30a7bfec3bebc38f4fe09..fa73ab19d8bd24bba688fae309f1c70b27687a83 100644 (file)
@@ -6,25 +6,23 @@
  * Babeltrace CTF file system Reader Component queries
  */
 
-#define BT_LOG_OUTPUT_LEVEL log_level
-#define BT_LOG_TAG          "PLUGIN/SRC.CTF.FS/QUERY"
-#include "logging/log.h"
-
-#include "query.hpp"
-#include <stdbool.h>
 #include <glib.h>
 #include <glib/gstdio.h>
-#include <fcntl.h>
 #include <sys/types.h>
-#include <sys/stat.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#define BT_LOG_OUTPUT_LEVEL ((enum bt_log_level) log_level)
+#define BT_LOG_TAG          "PLUGIN/SRC.CTF.FS/QUERY"
+#include "logging/comp-logging.h"
+#include "logging/log.h"
+
 #include "common/assert.h"
-#include "metadata.hpp"
+
 #include "../common/metadata/decoder.hpp"
-#include "common/common.h"
-#include "common/macros.h"
-#include <babeltrace2/babeltrace.h>
 #include "fs.hpp"
-#include "logging/comp-logging.h"
+#include "metadata.hpp"
+#include "query.hpp"
 
 #define METADATA_TEXT_SIG "/* CTF 1.8"
 
@@ -87,7 +85,7 @@ metadata_info_query(bt_self_component_class_source *self_comp_class_src, const b
     path = bt_value_string_get(path_value);
 
     BT_ASSERT(path);
-    metadata_fp = ctf_fs_metadata_open_file(path);
+    metadata_fp = ctf_fs_metadata_open_file(path, log_level, self_comp_class);
     if (!metadata_fp) {
         BT_COMP_CLASS_LOGE_APPEND_CAUSE(self_comp_class, "Cannot open trace metadata: path=\"%s\".",
                                         path);
@@ -167,7 +165,7 @@ end:
     if (metadata_fp) {
         ret = fclose(metadata_fp);
         if (ret) {
-            BT_LOGE_ERRNO("Cannot close metatada file stream", ": path=\"%s\"", path);
+            BT_LOGE_ERRNO("Cannot close metadata file stream", ": path=\"%s\"", path);
         }
     }
 
@@ -338,7 +336,7 @@ trace_infos_query(bt_self_component_class_source *self_comp_class_src, const bt_
         goto error;
     }
 
-    ctf_fs = ctf_fs_component_create(log_level, NULL);
+    ctf_fs = ctf_fs_component_create(log_level);
     if (!ctf_fs) {
         goto error;
     }
This page took 0.024181 seconds and 4 git commands to generate.