From 05cab52530332c97aca9d8c78a8cae2f82f00896 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 28 Feb 2013 21:27:45 -0500 Subject: [PATCH 1/1] Fix: Ensure the specified input format is CTF MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers --- 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 ed19fa85..83f300c5 100644 --- a/converter/babeltrace.c +++ b/converter/babeltrace.c @@ -606,7 +606,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 31962990..78e9055a 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) -- 2.34.1