[lttng-dev] [PATCH babeltrace] Fix: Ensure the specified input format is CTF
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu Feb 28 21:28:51 EST 2013
* Jérémie Galarneau (jeremie.galarneau at efficios.com) wrote:
> Add a check to make sure the input trace format argument passed to the
> babeltrace converter is "ctf" as it is currently the only one supported.
>
> Add a note to this effect in the man page.
>
> Fixes #462
merged, thanks!
Mathieu
>
> Signed-off-by: Jérémie Galarneau <jeremie.galarneau at efficios.com>
> ---
> converter/babeltrace.c | 2 +-
> doc/babeltrace.1 | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/converter/babeltrace.c b/converter/babeltrace.c
> index 20ded00..6847248 100644
> --- a/converter/babeltrace.c
> +++ b/converter/babeltrace.c
> @@ -607,7 +607,7 @@ int main(int argc, char **argv)
> }
> }
> fmt_read = bt_lookup_format(g_quark_from_static_string(opt_input_format));
> - if (!fmt_read) {
> + if (!fmt_read || fmt_read->name != g_quark_from_static_string("ctf")) {
> fprintf(stderr, "[error] Format \"%s\" is not supported.\n\n",
> opt_input_format);
> partial_error = 1;
> diff --git a/doc/babeltrace.1 b/doc/babeltrace.1
> index 3196299..78e9055 100644
> --- a/doc/babeltrace.1
> +++ b/doc/babeltrace.1
> @@ -29,7 +29,7 @@ Input trace FILE(s) or directory(ies)
> Output trace path (default: stdout)
> .TP
> .BR "-i, --input-format FORMAT"
> -Input trace format (default: ctf)
> +Input trace format (default: ctf). CTF is currently the only supported input format.
> .TP
> .BR "-o, --output-format FORMAT"
> Output trace format (default: text)
> --
> 1.8.1.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list