static GPtrArray *opt_input_paths;
static char *opt_output_path;
-static struct format *fmt_read;
+static struct bt_format *fmt_read;
static
void strlower(char *str)
opt_payload_field_names = 0;
} else {
fprintf(stderr, "[error] unknown field name type %s\n", str);
- free(strlist);
ret = -EINVAL;
goto end;
}
*/
int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
const char *format_str,
- void (*packet_seek)(struct stream_pos *pos,
+ void (*packet_seek)(struct bt_stream_pos *pos,
size_t offset, int whence))
{
return ret;
}
-int convert_trace(struct trace_descriptor *td_write,
+int convert_trace(struct bt_trace_descriptor *td_write,
struct bt_context *ctx)
{
struct bt_ctf_iter *iter;
int main(int argc, char **argv)
{
int ret, partial_error = 0, open_success = 0;
- struct format *fmt_write;
- struct trace_descriptor *td_write;
+ struct bt_format *fmt_write;
+ struct bt_trace_descriptor *td_write;
struct bt_context *ctx;
int i;
}
printf_verbose("Converting from format: %s\n",
opt_input_format ? : "ctf <default>");
- printf_verbose("Converting to directory: %s\n",
+ printf_verbose("Converting to target: %s\n",
opt_output_path ? : "<stdout>");
printf_verbose("Converting to format: %s\n",
opt_output_format ? : "text <default>");
}
}
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;