From: David Goulet Date: Thu, 26 May 2011 19:15:43 +0000 (-0400) Subject: Add validation to stop a trace without a session name X-Git-Tag: v2.0-pre1~111 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=6d8076ad2a383e3a1d9a5c78fa67e882751bbb1a;ds=sidebyside Add validation to stop a trace without a session name Signed-off-by: David Goulet --- diff --git a/lttng/lttng.c b/lttng/lttng.c index 7fbbcd68f..5319c13d3 100644 --- a/lttng/lttng.c +++ b/lttng/lttng.c @@ -569,6 +569,9 @@ static int validate_options(void) } else if (opt_stop_trace && opt_trace_pid != 0 && opt_trace_name == NULL) { ERR("Please specify a trace name for user-space tracing"); goto error; + } else if (opt_stop_trace && opt_session_name == NULL) { + ERR("Please specify a session to stop tracing"); + goto error; } /* If start trace, auto start tracing */