X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=9cb19f4dc323159be1da0bb8e4b00b3526577ffd;hp=fb4ef730d7619c780c7797221ce625c755b08bd6;hb=118f5776fcc9e4dc1e79d96d697825bc95174fcb;hpb=22d7cb55cf9622cee29c9d75dca31ffa4a8f7336 diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index fb4ef730..9cb19f4d 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -863,7 +863,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) { @@ -907,9 +906,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: