projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix context API
[babeltrace.git]
/
lib
/
context.c
diff --git
a/lib/context.c
b/lib/context.c
index 507e90abb92d0abb7d94a06d1fe8d863b0a10f79..f2f76be31a1cdbe0dc40da3284948ebc21812855 100644
(file)
--- a/
lib/context.c
+++ b/
lib/context.c
@@
-67,9
+67,9
@@
int bt_context_add_trace(struct bt_context *ctx, const char *path,
td = fmt->open_trace(path, O_RDONLY,
ctf_move_pos_slow, NULL);
if (!td) {
td = fmt->open_trace(path, O_RDONLY,
ctf_move_pos_slow, NULL);
if (!td) {
- fprintf(stdout, "[error] [Context] Cannot
O
pen_trace of the format %s .\n\n",
+ fprintf(stdout, "[error] [Context] Cannot
o
pen_trace of the format %s .\n\n",
path);
path);
- return
0
;
+ return
-1
;
}
/* Create an handle for the trace */
}
/* Create an handle for the trace */
@@
-77,7
+77,7
@@
int bt_context_add_trace(struct bt_context *ctx, const char *path,
if (handle < 0) {
fprintf(stdout, "[error] [Context] Creating trace handle %s .\n\n",
path);
if (handle < 0) {
fprintf(stdout, "[error] [Context] Creating trace handle %s .\n\n",
path);
- return
0
;
+ return
-1
;
}
handle->format = fmt;
handle->td = td;
}
handle->format = fmt;
handle->td = td;
@@
-89,14
+89,14
@@
int bt_context_add_trace(struct bt_context *ctx, const char *path,
(gpointer) (unsigned long) handle->id,
handle);
trace_collection_add(ctx->tc, td);
(gpointer) (unsigned long) handle->id,
handle);
trace_collection_add(ctx->tc, td);
- return
handle->id
;
+ return
0
;
}
/*
* Unable to open toplevel: failure.
* Unable to open some subdirectory or file: warn and continue;
*/
}
/*
* Unable to open toplevel: failure.
* Unable to open some subdirectory or file: warn and continue;
*/
-int bt_context_add_traces(struct bt_context *ctx, const char *path,
+int bt_context_add_traces
_recursive
(struct bt_context *ctx, const char *path,
const char *format_str)
{
FTS *tree;
const char *format_str)
{
FTS *tree;
This page took
0.025714 seconds
and
4
git commands to generate.