int bt_context_add_trace(struct bt_context *ctx, const char *path,
const char *format_name,
- void (*packet_seek)(struct stream_pos *pos, size_t index,
+ void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
int whence),
- struct mmap_stream_list *stream_list,
+ struct bt_mmap_stream_list *stream_list,
FILE *metadata)
{
- struct trace_descriptor *td;
- struct format *fmt;
+ struct bt_trace_descriptor *td;
+ struct bt_format *fmt;
struct bt_trace_handle *handle;
int ret, closeret;
if (path) {
td = fmt->open_trace(path, O_RDONLY, packet_seek, NULL);
if (!td) {
- fprintf(stderr, "[warning] [Context] Cannot open_trace of format %s at path %s.\n\n",
+ fprintf(stderr, "[warning] [Context] Cannot open_trace of format %s at path %s.\n",
format_name, path);
ret = -1;
goto end;
/* Create an handle for the trace */
handle = bt_trace_handle_create(ctx);
- if (handle < 0) {
+ if (!handle) {
fprintf(stderr, "[error] [Context] Creating trace handle %s .\n\n",
path);
ret = -1;