ctf: append error causes when returning errors
[babeltrace.git] / src / plugins / ctf / common / metadata / visitor-parent-links.c
index 6300e3f31628da53d8f44e1a7af151ecb49c5563..5afcb0e6e19e6e21724baf0e169b1ca3d04f6799 100644 (file)
@@ -1,27 +1,9 @@
 /*
- * ctf-visitor-parent-links.c
+ * SPDX-License-Identifier: MIT
  *
- * Common Trace Format Metadata Parent Link Creator.
- *
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@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:
+ * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * 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.
+ * Common Trace Format Metadata Parent Link Creator.
  */
 
 #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp)
@@ -56,7 +38,7 @@ int ctf_visitor_unary_expression(int depth, struct ctf_node *node,
        case UNARY_DOTDOTDOT:
                break;
        default:
-               _BT_COMP_LOGE_LINENO(node->lineno,
+               _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node->lineno,
                        "Unknown expression link type: type=%d\n",
                        node->u.unary_expression.link);
                return -EINVAL;
@@ -78,7 +60,7 @@ int ctf_visitor_unary_expression(int depth, struct ctf_node *node,
 
        case UNARY_UNKNOWN:
        default:
-               _BT_COMP_LOGE_LINENO(node->lineno,
+               _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node->lineno,
                        "Unknown expression link type: type=%d\n",
                        node->u.unary_expression.link);
                return -EINVAL;
@@ -124,7 +106,7 @@ int ctf_visitor_type_specifier(int depth, struct ctf_node *node,
 
        case TYPESPEC_UNKNOWN:
        default:
-               _BT_COMP_LOGE_LINENO(node->lineno,
+               _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node->lineno,
                        "Unknown type specifier: type=%d\n",
                        node->u.field_class_specifier.type);
                return -EINVAL;
@@ -182,7 +164,7 @@ int ctf_visitor_field_class_declarator(int depth, struct ctf_node *node,
                break;
        case TYPEDEC_UNKNOWN:
        default:
-               _BT_COMP_LOGE_LINENO(node->lineno,
+               _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node->lineno,
                        "Unknown type declarator: type=%d\n",
                        node->u.field_class_declarator.type);
                return -EINVAL;
@@ -508,7 +490,7 @@ int ctf_visitor_parent_links(int depth, struct ctf_node *node,
 
        case NODE_UNKNOWN:
        default:
-               _BT_COMP_LOGE_LINENO(node->lineno,
+               _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node->lineno,
                        "Unknown node type: type=%d\n", node->type);
                return -EINVAL;
        }
This page took 0.025809 seconds and 4 git commands to generate.