- ret = bt_context_add_traces_recursive(ctx, opt_input_path,
- opt_input_format, NULL);
- if (ret < 0) {
- fprintf(stderr, "[error] opening trace \"%s\" for reading.\n\n",
- opt_input_path);
+ for (i = 0; i < opt_input_paths->len; i++) {
+ const char *ipath = g_ptr_array_index(opt_input_paths, i);
+ ret = bt_context_add_traces_recursive(ctx, ipath,
+ opt_input_format, NULL);
+ if (ret < 0) {
+ fprintf(stderr, "[error] opening trace \"%s\" for reading.\n\n",
+ ipath);
+ } else if (ret > 0) {
+ fprintf(stderr, "[warning] errors occurred when opening trace \"%s\" for reading, continuing anyway.\n\n",
+ ipath);
+ open_success = 1; /* some traces were OK */
+ partial_error = 1;
+ } else {
+ open_success = 1; /* all traces were OK */
+ }
+ }
+ if (!open_success) {
+ fprintf(stderr, "[error] none of the specified trace paths could be opened.\n\n");