Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
/* update trace_packet_header and stream_packet_context */
}
/* 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);
}
/* 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);
/* Read packet context */
ret = generic_rw(&pos->parent, &file_stream->stream.stream_packet_context->p);
assert(!ret);