-/*
- * Do a snapshot record with the URL if one is given (machine interface).
- */
-static int mi_record(const char *url)
-{
- int ret;
- struct lttng_snapshot_output *output = NULL;
-
- output = create_output_from_args(url);
- if (!output) {
- ret = CMD_FATAL;
- goto error;
- }
-
- ret = lttng_snapshot_record(current_session_name, output, 0);
- if (ret < 0) {
- ret = CMD_ERROR;
- goto error;
- }
-
- ret = mi_lttng_snapshot_record(writer, current_session_name, url,
- opt_ctrl_url, opt_data_url);
- if (ret) {
- ret = CMD_ERROR;
- }
-
-error:
- lttng_snapshot_output_destroy(output);
- return ret;
-}
-