From 6d8076ad2a383e3a1d9a5c78fa67e882751bbb1a Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 26 May 2011 15:15:43 -0400 Subject: [PATCH] Add validation to stop a trace without a session name Signed-off-by: David Goulet --- lttng/lttng.c | 3 +++ 1 file changed, 3 insertions(+) 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 */ -- 2.34.1