Move to kernel style SPDX license identifiers
[babeltrace.git] / src / ctf-writer / validation.c
index 1d50d4d6a86e9de555544003ea32308919a7c023..86d68626c56611e58ce6df4436dd9e8a14d9ce06 100644 (file)
@@ -1,35 +1,17 @@
 /*
- * validation.c
- *
- * Babeltrace - CTF writer: Validation of trace, stream class, and event class
+ * SPDX-License-Identifier: MIT
  *
  * Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
  *
- * 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.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Babeltrace - CTF writer: Validation of trace, stream class, and event class
  */
 
-#define BT_LOG_TAG "CTF-WRITER-VALIDATION"
+#define BT_LOG_TAG "CTF-WRITER/VALIDATION"
 #include "logging.h"
 
-#include <babeltrace2/ctf-writer/object.h>
+#include <babeltrace2-ctf-writer/object.h>
 
-#include "common/babeltrace.h"
+#include "common/macros.h"
 
 #include "assert-pre.h"
 #include "event-class.h"
@@ -60,7 +42,7 @@ int validate_event_class_types(struct bt_ctf_private_value *environment,
 {
        int ret = 0;
 
-       BT_LOGV("Validating event class field types: "
+       BT_LOGT("Validating event class field types: "
                "packet-header-ft-addr=%p, "
                "packet-context-ft-addr=%p, "
                "event-header-ft-addr=%p, "
@@ -122,7 +104,7 @@ int validate_stream_class_types(struct bt_ctf_private_value *environment,
 {
        int ret = 0;
 
-       BT_LOGV("Validating stream class field types: "
+       BT_LOGT("Validating stream class field types: "
                "packet-header-ft-addr=%p, "
                "packet-context-ft-addr=%p, "
                "event-header-ft-addr=%p, "
@@ -187,7 +169,7 @@ int validate_trace_types(struct bt_ctf_private_value *environment,
 {
        int ret = 0;
 
-       BT_LOGV("Validating event class field types: "
+       BT_LOGT("Validating event class field types: "
                "packet-header-ft-addr=%p", packet_header_type);
 
        /* Resolve sequence type lengths and variant type tags first */
@@ -280,7 +262,7 @@ int bt_ctf_validate_class_types(struct bt_ctf_private_value *environment,
        int contains_seq_var;
        int valid_ret;
 
-       BT_LOGV("Validating field types: "
+       BT_LOGT("Validating field types: "
                "packet-header-ft-addr=%p, "
                "packet-context-ft-addr=%p, "
                "event-header-ft-addr=%p, "
@@ -337,7 +319,7 @@ int bt_ctf_validate_class_types(struct bt_ctf_private_value *environment,
                                goto skip_packet_header_type_copy;
                        }
 
-                       BT_LOGV_STR("Copying packet header field type because it contains at least one sequence or variant field type.");
+                       BT_LOGT_STR("Copying packet header field type because it contains at least one sequence or variant field type.");
                        packet_header_type_copy =
                                copy_field_type_func(packet_header_type);
                        if (!packet_header_type_copy) {
@@ -388,7 +370,7 @@ skip_packet_header_type_copy:
                                goto skip_packet_context_type_copy;
                        }
 
-                       BT_LOGV_STR("Copying packet context field type because it contains at least one sequence or variant field type.");
+                       BT_LOGT_STR("Copying packet context field type because it contains at least one sequence or variant field type.");
                        packet_context_type_copy =
                                copy_field_type_func(packet_context_type);
                        if (!packet_context_type_copy) {
@@ -419,7 +401,7 @@ skip_packet_context_type_copy:
                                goto skip_event_header_type_copy;
                        }
 
-                       BT_LOGV_STR("Copying event header field type because it contains at least one sequence or variant field type.");
+                       BT_LOGT_STR("Copying event header field type because it contains at least one sequence or variant field type.");
                        event_header_type_copy =
                                copy_field_type_func(event_header_type);
                        if (!event_header_type_copy) {
@@ -451,7 +433,7 @@ skip_event_header_type_copy:
                                goto skip_stream_event_ctx_type_copy;
                        }
 
-                       BT_LOGV_STR("Copying stream event context field type because it contains at least one sequence or variant field type.");
+                       BT_LOGT_STR("Copying stream event context field type because it contains at least one sequence or variant field type.");
                        stream_event_ctx_type_copy =
                                copy_field_type_func(stream_event_ctx_type);
                        if (!stream_event_ctx_type_copy) {
@@ -513,7 +495,7 @@ sc_validation_done:
                                goto skip_event_context_type_copy;
                        }
 
-                       BT_LOGV_STR("Copying event context field type because it contains at least one sequence or variant field type.");
+                       BT_LOGT_STR("Copying event context field type because it contains at least one sequence or variant field type.");
                        event_context_type_copy =
                                copy_field_type_func(event_context_type);
                        if (!event_context_type_copy) {
@@ -544,7 +526,7 @@ skip_event_context_type_copy:
                                goto skip_event_payload_type_copy;
                        }
 
-                       BT_LOGV_STR("Copying event payload field type because it contains at least one sequence or variant field type.");
+                       BT_LOGT_STR("Copying event payload field type because it contains at least one sequence or variant field type.");
                        event_payload_type_copy =
                                copy_field_type_func(event_payload_type);
                        if (!event_payload_type_copy) {
This page took 0.026429 seconds and 4 git commands to generate.