#include <babeltrace/ctf-ir/metadata.h> /* for clocks */
+#define PARTIAL_ERROR_SLEEP 3 /* 3 seconds */
+
#define DEFAULT_FILE_ARRAY_SIZE 1
static char *opt_input_format, *opt_output_format;
/* Pointer into const argv */
}
ctx = bt_context_create();
+ if (!ctx) {
+ goto error_td_read;
+ }
ret = bt_context_add_traces_recursive(ctx, opt_input_path,
opt_input_format, NULL);
goto error_td_write;
}
+ /*
+ * Errors happened when opening traces, but we continue anyway.
+ * sleep to let user see the stderr output before stdout.
+ */
+ if (partial_error) {
+ sleep(PARTIAL_ERROR_SLEEP);
+ }
+
ret = convert_trace(td_write, ctx);
if (ret) {
fprintf(stderr, "Error printing trace.\n\n");