X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fwriter%2Fevent-fields.c;h=c49bc3fa6dc1bca5b325b1be872480c9e68a1487;hp=c4d1b968587e33f00f24f8efe0c0658c201e6ba6;hb=118f5776fcc9e4dc1e79d96d697825bc95174fcb;hpb=024e61817685a20caceb4e3ef3bdc019a7af6b6e diff --git a/formats/ctf/writer/event-fields.c b/formats/ctf/writer/event-fields.c index c4d1b968..c49bc3fa 100644 --- a/formats/ctf/writer/event-fields.c +++ b/formats/ctf/writer/event-fields.c @@ -30,6 +30,7 @@ #include #include #include +#include #define PACKET_LEN_INCREMENT (getpagesize() * 8 * CHAR_BIT) @@ -445,7 +446,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field, tag_enum_integer = container_of(tag_enum, struct bt_ctf_field_integer, parent); - if (!bt_ctf_field_validate(variant->tag)) { + if (bt_ctf_field_validate(tag_field) < 0) { goto end; } @@ -1241,9 +1242,13 @@ int increase_packet_size(struct ctf_stream_pos *pos) } pos->packet_size += PACKET_LEN_INCREMENT; - ret = posix_fallocate(pos->fd, pos->mmap_offset, - pos->packet_size / CHAR_BIT); + do { + ret = bt_posix_fallocate(pos->fd, pos->mmap_offset, + pos->packet_size / CHAR_BIT); + } while (ret == EINTR); if (ret) { + errno = EINTR; + ret = -1; goto end; }