From 75847d0ab8f98b1bc982b25c8a6d86a5a7f4b2d7 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 22 Jun 2011 14:46:41 -0400 Subject: [PATCH] Fix babeltrace-log (output) handling in ctf.c Signed-off-by: Mathieu Desnoyers --- formats/ctf/ctf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index dc7baf5a..a20e6a75 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -427,12 +427,12 @@ void ctf_move_pos_slow(struct ctf_stream_pos *pos, size_t offset, int whence) } /* update trace_packet_header and stream_packet_context */ - if (file_stream->stream.trace_packet_header) { + if (pos->prot != PROT_WRITE && file_stream->stream.trace_packet_header) { /* Read packet header */ ret = generic_rw(&pos->parent, &file_stream->stream.trace_packet_header->p); assert(!ret); } - if (file_stream->stream.stream_packet_context) { + if (pos->prot != PROT_WRITE && file_stream->stream.stream_packet_context) { /* Read packet context */ ret = generic_rw(&pos->parent, &file_stream->stream.stream_packet_context->p); assert(!ret); -- 2.34.1