BT_CTF_BYTE_ORDER_NONE -> BT_CTF_BYTE_ORDER_UNSPECIFIED to match base
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 15 Jun 2017 20:36:47 +0000 (16:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Jun 2017 19:53:06 +0000 (15:53 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/ctf-ir/field-types-internal.h
include/babeltrace/ctf-ir/field-types.h
include/babeltrace/ctf-ir/trace.h
lib/ctf-ir/trace.c
plugins/libctfcopytrace/ctfcopytrace.c
tests/lib/test_ctf_writer.c

index f408f50b7f3727105305949ba6536d320b2715c2..a4f4c833f2265617937930d228bd9e90e508d74d 100644 (file)
@@ -253,8 +253,8 @@ const char *bt_ctf_byte_order_string(enum bt_ctf_byte_order bo)
        switch (bo) {
        case BT_CTF_BYTE_ORDER_UNKNOWN:
                return "BT_CTF_BYTE_ORDER_UNKNOWN";
-       case BT_CTF_BYTE_ORDER_NONE:
-               return "BT_CTF_BYTE_ORDER_NONE";
+       case BT_CTF_BYTE_ORDER_UNSPECIFIED:
+               return "BT_CTF_BYTE_ORDER_UNSPECIFIED";
        case BT_CTF_BYTE_ORDER_NATIVE:
                return "BT_CTF_BYTE_ORDER_NATIVE";
        case BT_CTF_BYTE_ORDER_LITTLE_ENDIAN:
index cf332762e6694f1acf2e4bb0e63fa98bf1d1a598..29928986b809fb052d1e1f8e9584d803d5a83806 100644 (file)
@@ -493,10 +493,10 @@ enum bt_ctf_byte_order {
        BT_CTF_BYTE_ORDER_NATIVE = 0,
 
        /**
-       No byte order; the initial native byte order of a
+       Unspecified byte order; the initial native byte order of a
        \link ctfirtraceclass CTF IR trace class\endlink.
        */
-       BT_CTF_BYTE_ORDER_NONE,
+       BT_CTF_BYTE_ORDER_UNSPECIFIED,
 
        /// Little-endian.
        BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
index 362cd707c8152223de0c4573bee5a527d2eedd4c..c7fa1f31b5eb7d0d0798c47f94625f061ecdfc5e 100644 (file)
@@ -181,8 +181,9 @@ The created trace class has the following initial properties:
   with bt_ctf_trace_set_name().
 - <strong>UUID</strong>: none. You can set a UUID with
   bt_ctf_trace_set_uuid().
-- <strong>Native byte order</strong>: #BT_CTF_BYTE_ORDER_NONE. You
-  can set a native byte order with bt_ctf_trace_set_native_byte_order().
+- <strong>Native byte order</strong>: #BT_CTF_BYTE_ORDER_UNSPECIFIED.
+  You can set a native byte order with
+  bt_ctf_trace_set_native_byte_order().
 - <strong>Environment</strong>: empty. You can add environment entries
   with bt_ctf_trace_set_environment_field(),
   bt_ctf_trace_set_environment_field_integer(), and
@@ -266,7 +267,7 @@ extern enum bt_ctf_byte_order bt_ctf_trace_get_native_byte_order(
 - #BT_CTF_BYTE_ORDER_BIG_ENDIAN
 - #BT_CTF_BYTE_ORDER_NETWORK
 - <strong>If the trace is not in CTF writer mode<strong>,
-  #BT_CTF_BYTE_ORDER_NONE.
+  #BT_CTF_BYTE_ORDER_UNSPECIFIED.
 
 @param[in] trace_class         Trace class of which to set the native byte
                                order.
@@ -275,7 +276,7 @@ extern enum bt_ctf_byte_order bt_ctf_trace_get_native_byte_order(
 
 @prenotnull{trace_class}
 @prehot{trace_class}
-@pre \p native_byte_order is either #BT_CTF_BYTE_ORDER_NONE (if the
+@pre \p native_byte_order is either #BT_CTF_BYTE_ORDER_UNSPECIFIED (if the
        trace is not in CTF writer mode),
        #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN, #BT_CTF_BYTE_ORDER_BIG_ENDIAN, or
        #BT_CTF_BYTE_ORDER_NETWORK.
index 37fa2763f93859fb265cabdfb15c40ee50c6428b..634a71efd863af6ec05842d2374cbb4a3c23dd24 100644 (file)
@@ -101,7 +101,7 @@ struct bt_ctf_trace *bt_ctf_trace_create(void)
        }
 
        BT_LOGD_STR("Creating trace object.");
-       trace->native_byte_order = BT_CTF_BYTE_ORDER_NONE;
+       trace->native_byte_order = BT_CTF_BYTE_ORDER_UNSPECIFIED;
        bt_object_init(trace, bt_ctf_trace_destroy);
        trace->clocks = g_ptr_array_new_with_free_func(
                (GDestroyNotify) bt_put);
@@ -1641,8 +1641,8 @@ int append_trace_metadata(struct bt_ctf_trace *trace,
        int ret = 0;
 
        if (trace->native_byte_order == BT_CTF_BYTE_ORDER_NATIVE ||
-                       trace->native_byte_order == BT_CTF_BYTE_ORDER_NONE) {
-               BT_LOGW("Invalid parameter: trace's byte order cannot be BT_CTF_BYTE_ORDER_NATIVE or BT_CTF_BYTE_ORDER_NONE at this point; "
+                       trace->native_byte_order == BT_CTF_BYTE_ORDER_UNSPECIFIED) {
+               BT_LOGW("Invalid parameter: trace's byte order cannot be BT_CTF_BYTE_ORDER_NATIVE or BT_CTF_BYTE_ORDER_UNSPECIFIED at this point; "
                        "set it with bt_ctf_trace_set_native_byte_order(): "
                        "addr=%p, name=\"%s\"",
                        trace, bt_ctf_trace_get_name(trace));
@@ -1845,8 +1845,8 @@ int bt_ctf_trace_set_native_byte_order(struct bt_ctf_trace *trace,
        }
 
        if (trace->is_created_by_writer &&
-                       byte_order == BT_CTF_BYTE_ORDER_NONE) {
-               BT_LOGW("Invalid parameter: BT_CTF_BYTE_ORDER_NONE byte order is not allowed for a CTF writer trace: "
+                       byte_order == BT_CTF_BYTE_ORDER_UNSPECIFIED) {
+               BT_LOGW("Invalid parameter: BT_CTF_BYTE_ORDER_UNSPECIFIED byte order is not allowed for a CTF writer trace: "
                        "addr=%p, name=\"%s\"",
                        trace, bt_ctf_trace_get_name(trace));
                ret = -1;
index 28aa5e5c6d07d8eb42711db15aed896183e18a98..894ce2f39f4b7016a4d7f1ee8763f6418bb41240 100644 (file)
@@ -885,7 +885,7 @@ enum bt_component_status ctf_copy_trace(FILE *err, struct bt_ctf_trace *trace,
         * the CTF writer object chooses, which is the machine's native
         * byte order.
         */
-       if (order != BT_CTF_BYTE_ORDER_NONE) {
+       if (order != BT_CTF_BYTE_ORDER_UNSPECIFIED) {
                ret = bt_ctf_trace_set_native_byte_order(writer_trace, order);
                if (ret) {
                        fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__, __LINE__);
index 9eed82f42014e800fbe45f91237a8d7e160809bc..6c2defc64b8bc90274180302e412c5671bd92ae0 100644 (file)
@@ -2976,8 +2976,8 @@ int main(int argc, char **argv)
        trace = bt_ctf_writer_get_trace(writer);
        ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_NATIVE),
                "Cannot set a trace's byte order to BT_CTF_BYTE_ORDER_NATIVE");
-       ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_NONE),
-               "Cannot set a trace's byte order to BT_CTF_BYTE_ORDER_NONE");
+       ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_UNSPECIFIED),
+               "Cannot set a trace's byte order to BT_CTF_BYTE_ORDER_UNSPECIFIED");
        ok(trace,
                "bt_ctf_writer_get_trace returns a bt_ctf_trace object");
        ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_BIG_ENDIAN) == 0,
This page took 0.047599 seconds and 4 git commands to generate.