X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fwriter%2Fevent-fields.c;h=c49bc3fa6dc1bca5b325b1be872480c9e68a1487;hp=461888f9b09498e0ea558d9b39b2ccd3aa46ce7f;hb=118f5776fcc9e4dc1e79d96d697825bc95174fcb;hpb=a53ed9239af287c20f0668413b3c8239a487c920 diff --git a/formats/ctf/writer/event-fields.c b/formats/ctf/writer/event-fields.c index 461888f9..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) @@ -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; }