projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Ensure the specified input format is CTF
[babeltrace.git]
/
converter
/
babeltrace.c
diff --git
a/converter/babeltrace.c
b/converter/babeltrace.c
index b1f32c94b4d097d425e34910c56b1e68728b802c..83f300c5d9b2fa7635614fa477b173621f6a68b2 100644
(file)
--- a/
converter/babeltrace.c
+++ b/
converter/babeltrace.c
@@
-68,7
+68,7
@@
static char *opt_input_format, *opt_output_format;
static GPtrArray *opt_input_paths;
static char *opt_output_path;
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)
static
void strlower(char *str)
@@
-204,7
+204,6
@@
static int get_names_args(poptContext *pc)
opt_payload_field_names = 0;
} else {
fprintf(stderr, "[error] unknown field name type %s\n", str);
opt_payload_field_names = 0;
} else {
fprintf(stderr, "[error] unknown field name type %s\n", str);
- free(strlist);
ret = -EINVAL;
goto end;
}
ret = -EINVAL;
goto end;
}
@@
-516,7
+515,7
@@
int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
return ret;
}
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;
struct bt_context *ctx)
{
struct bt_ctf_iter *iter;
@@
-555,8
+554,8
@@
error_iter:
int main(int argc, char **argv)
{
int ret, partial_error = 0, open_success = 0;
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;
struct bt_context *ctx;
int i;
@@
-607,7
+606,7
@@
int main(int argc, char **argv)
}
}
fmt_read = bt_lookup_format(g_quark_from_static_string(opt_input_format));
}
}
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;
fprintf(stderr, "[error] Format \"%s\" is not supported.\n\n",
opt_input_format);
partial_error = 1;
This page took
0.025325 seconds
and
4
git commands to generate.