Skip to contentSkip to conversation

Fix: Ensure the specified input format is CTF

PATCH Mathieu Desnoyers 1 participant 1 message Mar 1, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Applied
#1 lore raw
Quoted 6 lines · * Jérémie Galarneau ([email protected]) 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

Quoted 41 lines
---
 converter/babeltrace.c | 2 +-
 doc/babeltrace.1       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
converter/babeltrace.c +1 -1
index 20ded00..6847248 100644
@@ -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;
doc/babeltrace.1 +1 -1
index 3196299..78e9055 100644
@@ -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)
Signature · 7 lines
1.8.1.4


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com