ctf: check version of LTTng trace index
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 4 Nov 2019 17:08:53 +0000 (12:08 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 14 Nov 2019 22:49:12 +0000 (17:49 -0500)
commit2068d50bb02a85b287150fa80bafc4d3dfc80a40
tree1412bdd39432ca80779cb3c6629d3bfc6773315e
parent2428e031943674437237ff59ad4c5f13ea73f081
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.025559 seconds and 4 git commands to generate.