projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: add `#include <stdbool.h>` whenever `bool` type is used
[babeltrace.git]
/
src
/
plugins
/
ctf
/
fs-src
/
metadata.c
diff --git
a/src/plugins/ctf/fs-src/metadata.c
b/src/plugins/ctf/fs-src/metadata.c
index 94ff889abe6741b9b5f3a4f503fc19d5a3f7740b..1576a9e76f2242ebd16bce7ce52f85a51f03ce32 100644
(file)
--- a/
src/plugins/ctf/fs-src/metadata.c
+++ b/
src/plugins/ctf/fs-src/metadata.c
@@
-26,15
+26,14
@@
#define BT_COMP_LOG_SELF_COMP self_comp
#define BT_LOG_OUTPUT_LEVEL log_level
#define BT_LOG_TAG "PLUGIN/SRC.CTF.FS/META"
#define BT_COMP_LOG_SELF_COMP self_comp
#define BT_LOG_OUTPUT_LEVEL log_level
#define BT_LOG_TAG "PLUGIN/SRC.CTF.FS/META"
-#include "
plugins
/comp-logging.h"
+#include "
logging
/comp-logging.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
-#include <stdbool.h>
#include "common/assert.h"
#include <glib.h>
#include "common/assert.h"
#include <glib.h>
-#include "com
pat
/uuid.h"
+#include "com
mon
/uuid.h"
#include "compat/memstream.h"
#include <babeltrace2/babeltrace.h>
#include "compat/memstream.h"
#include <babeltrace2/babeltrace.h>
@@
-102,12
+101,15
@@
int ctf_fs_metadata_set_trace_class(
.self_comp = self_comp,
.clock_class_offset_s = config ? config->clock_class_offset_s : 0,
.clock_class_offset_ns = config ? config->clock_class_offset_ns : 0,
.self_comp = self_comp,
.clock_class_offset_s = config ? config->clock_class_offset_s : 0,
.clock_class_offset_ns = config ? config->clock_class_offset_ns : 0,
+ .force_clock_class_origin_unix_epoch =
+ config ? config->force_clock_class_origin_unix_epoch : false,
+ .create_trace_class = true,
};
bt_logging_level log_level = ctf_fs_trace->log_level;
file = get_file(ctf_fs_trace->path->str, log_level, self_comp);
if (!file) {
};
bt_logging_level log_level = ctf_fs_trace->log_level;
file = get_file(ctf_fs_trace->path->str, log_level, self_comp);
if (!file) {
- BT_COMP_LOGE("Cannot create metadata file object");
+ BT_COMP_LOGE("Cannot create metadata file object
.
");
ret = -1;
goto end;
}
ret = -1;
goto end;
}
@@
-115,15
+117,15
@@
int ctf_fs_metadata_set_trace_class(
ctf_fs_trace->metadata->decoder = ctf_metadata_decoder_create(
&decoder_config);
if (!ctf_fs_trace->metadata->decoder) {
ctf_fs_trace->metadata->decoder = ctf_metadata_decoder_create(
&decoder_config);
if (!ctf_fs_trace->metadata->decoder) {
- BT_COMP_LOGE("Cannot create metadata decoder object");
+ BT_COMP_LOGE("Cannot create metadata decoder object
.
");
ret = -1;
goto end;
}
ret = -1;
goto end;
}
- ret = ctf_metadata_decoder_
decode(ctf_fs_trace->metadata->decoder,
- file->fp);
+ ret = ctf_metadata_decoder_
append_content(
+
ctf_fs_trace->metadata->decoder,
file->fp);
if (ret) {
if (ret) {
- BT_COMP_LOGE("Cannot
decode metadata file
");
+ BT_COMP_LOGE("Cannot
update metadata decoder's content.
");
goto end;
}
goto end;
}
@@
-151,9
+153,7
@@
int ctf_fs_metadata_init(struct ctf_fs_metadata *metadata)
BT_HIDDEN
void ctf_fs_metadata_fini(struct ctf_fs_metadata *metadata)
{
BT_HIDDEN
void ctf_fs_metadata_fini(struct ctf_fs_metadata *metadata)
{
- if (metadata->text) {
- free(metadata->text);
- }
+ free(metadata->text);
if (metadata->trace_class) {
BT_TRACE_CLASS_PUT_REF_AND_RESET(metadata->trace_class);
if (metadata->trace_class) {
BT_TRACE_CLASS_PUT_REF_AND_RESET(metadata->trace_class);
This page took
0.024518 seconds
and
4
git commands to generate.