Fix: Ensure the specified input format is CTF
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 1 Mar 2013 02:27:45 +0000 (21:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 1 Mar 2013 02:27:45 +0000 (21:27 -0500)
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 <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
converter/babeltrace.c
doc/babeltrace.1

index ed19fa85a5b0fd59baa958be6f5eb3a8ef45d096..83f300c5d9b2fa7635614fa477b173621f6a68b2 100644 (file)
@@ -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;
index 319629909a34ce462e93531c7c403c2bfd10d1d4..78e9055a57812a945472d941df33fbe02b90bbb1 100644 (file)
@@ -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)
This page took 0.025219 seconds and 4 git commands to generate.