cli: `convert` command: do not allow more than one sink component
[babeltrace.git] / src / cli / babeltrace2-cfg-cli-args.c
index 2beacc6ade5012323310d7d3461d349d87586b7a..cb900f48b22e47248694593d9f82fb4191e7ac3a 100644 (file)
@@ -4162,6 +4162,13 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
                goto error;
        }
 
+       /* Make sure there's a single sink component */
+       if (g_list_length(sink_names) != 1) {
+               BT_CLI_LOGE_APPEND_CAUSE(
+                       "More than one sink component specified.");
+               goto error;
+       }
+
        /*
         * Prepend the muxer, the trimmer, and the debug info to the
         * filter chain so that we have:
This page took 0.023298 seconds and 4 git commands to generate.