X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fctf-writer%2Fvalidation.c;h=86d68626c56611e58ce6df4436dd9e8a14d9ce06;hb=827e42e017fc5f525aa39a3851bf2e7e50e887aa;hp=8efd5463011a30b534238e43d90d13731588f7c5;hpb=350ad6c1c5f45a4e90c33e3c1354125c209bbf02;p=babeltrace.git diff --git a/src/ctf-writer/validation.c b/src/ctf-writer/validation.c index 8efd5463..86d68626 100644 --- a/src/ctf-writer/validation.c +++ b/src/ctf-writer/validation.c @@ -1,33 +1,15 @@ /* - * validation.c - * - * Babeltrace - CTF writer: Validation of trace, stream class, and event class + * SPDX-License-Identifier: MIT * * Copyright 2016-2018 Philippe Proulx * - * 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" #include "logging.h" -#include +#include #include "common/macros.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) {