X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;fp=formats%2Fctf%2Fctf.c;h=2555f4bbf3c65df0143a3c2abb22a5532e42dcb5;hp=7788ecbf4b0c1b67d70aa2c7c90256a8520b7d8f;hb=d9548894df258a8984385470c9c251c99329e01c;hpb=f847f3aec55ecaa393f6dab5598b194df0d2b801 diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 7788ecbf..2555f4bb 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -861,7 +861,6 @@ void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence) struct ctf_file_stream *file_stream = container_of(pos, struct ctf_file_stream, pos); int ret; - off_t off; struct packet_index *packet_index, *prev_index; switch (whence) { @@ -905,9 +904,11 @@ void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence) } pos->content_size = -1U; /* Unknown at this point */ pos->packet_size = WRITE_PACKET_LEN; - off = bt_posix_fallocate(pos->fd, pos->mmap_offset, - pos->packet_size / CHAR_BIT); - assert(off == 0); + do { + ret = bt_posix_fallocate(pos->fd, pos->mmap_offset, + pos->packet_size / CHAR_BIT); + } while (ret == EINTR); + assert(ret == 0); pos->offset = 0; } else { read_next_packet: