Port: handle 'size_t' / 'off_t' on Solaris
[babeltrace.git] / cli / babeltrace-cfg-cli-args.c
index e4d66b7ffcf7eaa0e8fb6b171dadbdedc972f08b..4fba2b162a206e02562509f319cff65b6e4d4796 100644 (file)
@@ -3596,6 +3596,7 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
        bool got_output_format_opt = false;
        bool trimmer_has_begin = false;
        bool trimmer_has_end = false;
+       bool stream_intersection_mode = false;
        GString *cur_name = NULL;
        GString *cur_name_prefix = NULL;
        const char *leftover = NULL;
@@ -4106,20 +4107,14 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
                case OPT_CLOCK_OFFSET:
                        base_implicit_ctf_input_args.exists = true;
                        append_implicit_component_param(
-                                       &implicit_muxer_args,
+                                       &base_implicit_ctf_input_args,
                                        "clock-class-offset-s", arg);
-                       if (ret) {
-                               goto error;
-                       }
                        break;
                case OPT_CLOCK_OFFSET_NS:
                        base_implicit_ctf_input_args.exists = true;
-                       ret = append_implicit_component_extra_param(
-                               &base_implicit_ctf_input_args,
-                               "clock-class-offset-ns", arg);
-                       if (ret) {
-                               goto error;
-                       }
+                       append_implicit_component_param(
+                                       &base_implicit_ctf_input_args,
+                                       "clock-class-offset-ns", arg);
                        break;
                case OPT_CLOCK_SECONDS:
                        append_implicit_component_param(
@@ -4269,10 +4264,11 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
                        print_run_args_0 = true;
                        break;
                case OPT_STREAM_INTERSECTION:
-                       append_implicit_component_param(
-                               &base_implicit_ctf_input_args,
-                               "stream-intersection", "yes");
-                       base_implicit_ctf_input_args.exists = true;
+                       /*
+                        * Applies to all traces implementing the trace-info
+                        * query.
+                        */
+                       stream_intersection_mode = true;
                        break;
                case OPT_VERBOSE:
                        if (*log_level != 'V' && *log_level != 'D') {
@@ -4658,6 +4654,11 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
         * here.
         */
        if (print_run_args || print_run_args_0) {
+               if (stream_intersection_mode) {
+                       printf_err("Cannot specify --stream-intersection with --run-args or --run-args-0\n");
+                       goto error;
+               }
+
                for (i = 0; i < bt_value_array_size(run_args); i++) {
                        struct bt_value *arg_value =
                                bt_value_array_get(run_args, i);
@@ -4708,6 +4709,7 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
                goto error;
        }
 
+       cfg->cmd_data.run.stream_intersection_mode = stream_intersection_mode;
        goto end;
 
 error:
This page took 0.025873 seconds and 4 git commands to generate.