Change-Id: Id6a62715e3e2a29216debe1c72986215d7f47459
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8261
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12299
goto error;
}
- ds_file->file = ctf_fs_file_create(parentLogger).release();
+ ds_file->file = ctf_fs_file_create(parentLogger);
if (!ds_file->file) {
goto error;
}
ds_file->stream = std::move(stream);
ds_file->metadata = ctf_fs_trace->metadata;
g_string_assign(ds_file->file->path, path);
- ret = ctf_fs_file_open(ds_file->file, "rb");
+ ret = ctf_fs_file_open(ds_file->file.get(), "rb");
if (ret) {
goto error;
}
(void) ds_file_munmap(ds_file);
- if (ds_file->file) {
- ctf_fs_file_destroy(ds_file->file);
- }
-
delete ds_file;
}
#include "cpp-common/bt2c/logging.hpp"
#include "../common/src/msg-iter/msg-iter.hpp"
+#include "file.hpp"
struct ctf_fs_ds_file_info
{
/* Weak */
struct ctf_fs_metadata *metadata = nullptr;
- /* Owned by this */
- struct ctf_fs_file *file = nullptr;
+ ctf_fs_file::UP file;
bt2::Stream::Shared stream;