X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fctf-ir%2Fstream.c;h=5741a7a520f6fbc4126f50ec031b5be12f269174;hb=6ead1648f8ff35637ce0ec30cca91cfd78cefc91;hp=4ce2fe3016dce3957c4d078cf7c3e194f268bc87;hpb=f0ea9318c34603eaed936234d3953e80d2536e62;p=babeltrace.git diff --git a/lib/ctf-ir/stream.c b/lib/ctf-ir/stream.c index 4ce2fe30..5741a7a5 100644 --- a/lib/ctf-ir/stream.c +++ b/lib/ctf-ir/stream.c @@ -360,7 +360,7 @@ int set_packet_context_events_discarded(struct bt_ctf_stream *stream) * discarded events. We do not allow wrapping here. If it's * valid, update the stream's current count. */ - if (bt_ctf_field_is_set(field)) { + if (bt_ctf_field_value_is_set(field)) { uint64_t user_val; ret = bt_ctf_field_unsigned_integer_get_value(field, @@ -1494,7 +1494,7 @@ void reset_structure_field(struct bt_ctf_field *structure, const char *name) member = bt_ctf_field_structure_get_field(structure, name); if (member) { - (void) bt_ctf_field_reset(member); + (void) bt_ctf_field_reset_value(member); bt_put(member); } } @@ -1715,17 +1715,6 @@ int bt_ctf_stream_flush(struct bt_ctf_stream *stream) stream->flushed_packet_count++; stream->size += stream->pos.packet_size / CHAR_BIT; - do { - ret = ftruncate(stream->pos.fd, stream->size); - } while (ret == -1 && errno == EINTR); - if (ret == -1) { - BT_LOGE_ERRNO("Cannot truncate stream file to new size", - ": size=%" PRIu64 ", stream-addr=%p, " - "stream-name=\"%s\"", - stream->size, stream, - bt_ctf_stream_get_name(stream)); - } - end: /* Reset automatically-set fields. */ if (stream->packet_context) { @@ -1873,7 +1862,7 @@ int _set_structure_field_integer(struct bt_ctf_field *structure, char *name, } /* Make sure the payload has not already been set. */ - if (!force && bt_ctf_field_is_set(integer)) { + if (!force && bt_ctf_field_value_is_set(integer)) { /* Payload already set, not an error */ BT_LOGV("Field's payload is already set: struct-field-addr=%p, " "name=\"%s\", force=%d", structure, name, force);