compat: fix compilation with !BABELTRACE_HAVE_OPEN_MEMSTREAM
[babeltrace.git] / src / plugins / ctf / common / msg-iter / msg-iter.h
index 73bb121e91ca9896acc3db41a69cedc37e83b62f..edba6847793ee2158b1d87bdecc897e67cfbdb9c 100644 (file)
@@ -1,31 +1,15 @@
-#ifndef CTF_MSG_ITER_H
-#define CTF_MSG_ITER_H
-
 /*
- * Babeltrace - CTF message iterator
+ * SPDX-License-Identifier: MIT
  *
  * Copyright (c) 2015-2016 EfficiOS Inc. and Linux Foundation
  * Copyright (c) 2015-2016 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 message iterator
  */
 
+#ifndef CTF_MSG_ITER_H
+#define CTF_MSG_ITER_H
+
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -164,7 +148,7 @@ struct ctf_msg_iter_medium_ops {
         *     #CTF_MSG_ITER_MEDIUM_STATUS_EOF on the \em following
         *     call.
         *   - <b>#CTF_MSG_ITER_MEDIUM_STATUS_ERROR</b>: A fatal
-        *     error occured during this operation. In this case, the
+        *     error occurred during this operation. In this case, the
         *     message iterator function called by the user returns
         *     #CTF_MSG_ITER_STATUS_ERROR.
         *
@@ -344,11 +328,13 @@ const char *ctf_msg_iter_medium_status_string(
                return "AGAIN";
        case CTF_MSG_ITER_MEDIUM_STATUS_ERROR:
                return "ERROR";
+       case CTF_MSG_ITER_MEDIUM_STATUS_MEMORY_ERROR:
+               return "MEMORY_ERROR";
        case CTF_MSG_ITER_MEDIUM_STATUS_OK:
                return "OK";
-       default:
-               return "(unknown)";
        }
+
+       bt_common_abort();
 }
 
 static inline
@@ -362,11 +348,13 @@ const char *ctf_msg_iter_status_string(
                return "AGAIN";
        case CTF_MSG_ITER_STATUS_ERROR:
                return "ERROR";
+       case CTF_MSG_ITER_STATUS_MEMORY_ERROR:
+               return "MEMORY_ERROR";
        case CTF_MSG_ITER_STATUS_OK:
                return "OK";
-       default:
-               return "(unknown)";
        }
+
+       bt_common_abort();
 }
 
 #endif /* CTF_MSG_ITER_H */
This page took 0.024006 seconds and 4 git commands to generate.