ctf: append error causes when returning errors
[babeltrace.git] / src / plugins / ctf / common / metadata / ctf-meta-update-default-clock-classes.c
index 85575c0a24f8f7543d958676027aa46701a58c1c..f6c19b1a4e073e48c14f92c595b19d05d92a84fa 100644 (file)
@@ -1,21 +1,14 @@
 /*
- * Copyright 2018 - Philippe Proulx <pproulx@efficios.com>
+ * SPDX-License-Identifier: MIT
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
 #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp)
+#define BT_COMP_LOG_SELF_COMP_CLASS (log_cfg->self_comp_class)
 #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level)
 #define BT_LOG_TAG "PLUGIN/CTF/META/UPDATE-DEF-CC"
-#include "plugins/comp-logging.h"
+#include "logging/comp-logging.h"
 
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
@@ -49,7 +42,7 @@ int find_mapped_clock_class(struct ctf_field_class *fc,
                if (int_fc->mapped_clock_class) {
                        if (*clock_class && *clock_class !=
                                        int_fc->mapped_clock_class) {
-                               BT_COMP_LOGE("Stream class contains more than one "
+                               _BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE("Stream class contains more than one "
                                        "clock class: expected-cc-name=\"%s\", "
                                        "other-cc-name=\"%s\"",
                                        (*clock_class)->name->str,
@@ -199,7 +192,7 @@ int ctf_trace_class_update_default_clock_classes(struct ctf_trace_class *ctf_tc,
                ret = update_stream_class_default_clock_class(
                        ctf_tc->stream_classes->pdata[i], log_cfg);
                if (ret) {
-                       BT_COMP_LOGE("Stream class contains more than one "
+                       _BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE("Stream class contains more than one "
                                "clock class: stream-class-id=%" PRIu64,
                                sc->id);
                        goto end;
This page took 0.024707 seconds and 4 git commands to generate.