Pass stream pointer with callback caller data
[babeltrace.git] / converter / babeltrace.c
index 9d79c39d3a24b5f7139da59babce6f7a168bc7cf..be546750e96921b55fb871ae8aa70ddd7c6f3f76 100644 (file)
@@ -19,7 +19,8 @@
  */
 
 #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>
@@ -82,9 +83,7 @@ static void list_formats(FILE *fp)
 
 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");
@@ -213,7 +212,8 @@ static int traverse_dir(const char *fpath, const struct stat *sb,
        } 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);
@@ -291,7 +291,7 @@ int main(int argc, char **argv)
                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>");
This page took 0.02347 seconds and 4 git commands to generate.