Move opt_field_names/babeltrace_verbose/babeltrace_debug into lib
[babeltrace.git] / converter / babeltrace.c
index a39c1c452e0222c10db118ad19ffb3b4695d933c..04d2615e788dd470693c9d7a10a13b2f33545d4f 100644 (file)
@@ -40,9 +40,6 @@ static char *opt_output_format;
 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;
 
@@ -95,7 +92,9 @@ static void usage(FILE *fp)
        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");
@@ -212,7 +211,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, ctf_move_pos_slow);
+               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);
@@ -290,7 +290,7 @@ int main(int argc, char **argv)
                return 0;
        }
 
-       td_write = fmt_write->open_trace(opt_output_path, O_RDWR, NULL);
+       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.025263 seconds and 4 git commands to generate.