src/plugins/ctf/common: restructure subtree
[babeltrace.git] / src / plugins / ctf / fs-src / data-stream-file.cpp
index 3c28721fe2a87040746e6ba3aec1a4ffbc055368..7261fc748b5a48d3424b5e398520fd23129a1a84 100644 (file)
@@ -6,27 +6,30 @@
  * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (log_level)
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS/DS"
+#include <string.h>
+
 #include "logging/comp-logging.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <inttypes.h>
-#include "compat/mman.h"
-#include "compat/endian.h"
-#include <babeltrace2/babeltrace.h>
-#include "common/common.h"
-#include "file.hpp"
-#include "metadata.hpp"
-#include "../common/msg-iter/msg-iter.hpp"
 #include "common/assert.h"
+#include "compat/endian.h" /* IWYU pragma: keep  */
+#include "compat/mman.h"   /* IWYU pragma: keep  */
+
+#include "../common/src/msg-iter/msg-iter.hpp"
 #include "data-stream-file.hpp"
-#include <string.h>
+#include "file.hpp"
+#include "fs.hpp"
+#include "lttng-index.hpp"
 
 static inline size_t remaining_mmap_bytes(struct ctf_fs_ds_file *ds_file)
 {
@@ -125,7 +128,7 @@ static enum ctf_msg_iter_medium_status ds_file_mmap(struct ctf_fs_ds_file *ds_fi
     BT_ASSERT(ds_file->mmap_len > 0);
 
     ds_file->mmap_addr =
-        bt_mmap((void *) 0, ds_file->mmap_len, PROT_READ, MAP_PRIVATE, fileno(ds_file->file->fp),
+        bt_mmap(ds_file->mmap_len, PROT_READ, MAP_PRIVATE, fileno(ds_file->file->fp),
                 ds_file->mmap_offset_in_file, ds_file->log_level);
     if (ds_file->mmap_addr == MAP_FAILED) {
         BT_COMP_LOGE("Cannot memory-map address (size %zu) of file \"%s\" (%p) at offset %jd: %s",
@@ -229,7 +232,7 @@ end:
     return status;
 }
 
-static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t stream_id, void *data)
+static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t, void *data)
 {
     struct ctf_fs_ds_file *ds_file = (struct ctf_fs_ds_file *) data;
     bt_stream_class *ds_file_stream_class;
This page took 0.023663 seconds and 4 git commands to generate.