From: Jérémie Galarneau Date: Fri, 1 Mar 2013 02:27:45 +0000 (-0500) Subject: Fix: Ensure the specified input format is CTF X-Git-Tag: v1.1.0~8 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=05cab52530332c97aca9d8c78a8cae2f82f00896;hp=347e42774758b794e25f5c2b452706100cadd54e Fix: Ensure the specified input format is CTF 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 --- 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)