ctf: check version of LTTng trace index
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 4 Nov 2019 17:08:53 +0000 (12:08 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 4 Nov 2019 20:27:19 +0000 (15:27 -0500)
commit1984ac2bd456305f0739e9a329a5d335a8244596
treecb1a558cb1b4a28d17d4206f4f3a51004ba41b10
parent851de941fc0cdea645b905098fb8f2a61dfdd161
ctf: check version of LTTng trace index

If LTTng was to start producing trace index files with major version 2,
it would presumably be because the format has become
backwards-incompatible.  Babeltrace would currently try to parse it like
it parses version 1.x index files, and that would likely not give good
results.

This patch makes Babeltrace check the major version of LTTng trace index
files before parsing them, and ignore them if the major version is not 1.

Change-Id: Ieb4a795a3fce1f5196a2b4ab44575da1b4fc1364
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2325
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/plugins/ctf/fs-src/data-stream-file.c
This page took 0.024955 seconds and 4 git commands to generate.