*/
#define _XOPEN_SOURCE 700
-#include <babeltrace/babeltrace.h>
+#include <config.h>
+#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/format.h>
#include <popt.h>
#include <errno.h>
static const char *opt_input_path;
static const char *opt_output_path;
-int babeltrace_verbose, babeltrace_debug;
-int opt_field_names;
-
static struct trace_collection trace_collection_read;
static struct format *fmt_read;
static void usage(FILE *fp)
{
- fprintf(fp, "BabelTrace Trace Converter %u.%u\n\n",
- BABELTRACE_VERSION_MAJOR,
- BABELTRACE_VERSION_MINOR);
+ fprintf(fp, "BabelTrace Trace Converter %s\n\n", VERSION);
fprintf(fp, "usage : babeltrace [OPTIONS] INPUT <OUTPUT>\n");
fprintf(fp, "\n");
fprintf(fp, " INPUT Input trace path\n");
fprintf(fp, " -h, --help This help message\n");
fprintf(fp, " -l, --list List available formats\n");
fprintf(fp, " -v, --verbose Verbose mode\n");
+ fprintf(fp, " (or set BABELTRACE_VERBOSE env. var.)\n");
fprintf(fp, " -d, --debug Debug mode\n");
+ fprintf(fp, " (or set BABELTRACE_DEBUG env. var.)\n");
fprintf(fp, " -n, --names Print field names\n");
list_formats(fp);
fprintf(fp, "\n");
} else {
close(fd);
close(dirfd);
- td_read = fmt_read->open_trace(fpath, O_RDONLY);
+ td_read = fmt_read->open_trace(fpath, O_RDONLY, ctf_move_pos_slow,
+ NULL);
if (!td_read) {
fprintf(stdout, "Error opening trace \"%s\" "
"for reading.\n\n", fpath);
return 0;
}
- td_write = fmt_write->open_trace(opt_output_path, O_RDWR);
+ td_write = fmt_write->open_trace(opt_output_path, O_RDWR, NULL, NULL);
if (!td_write) {
fprintf(stdout, "Error opening trace \"%s\" for writing.\n\n",
opt_output_path ? : "<none>");