X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lttng%2Flttng.c;h=75cb1b47372323c656d59b8851fc41f9bb85b4dc;hb=947308c48c77d6dfd601cfc575d61ea833ed0b6e;hp=7fbbcd68f4f216388aedc661f8b2cef4951c0778;hpb=8c0faa1d8372c06087498985643ec9d2619d785b;p=lttng-tools.git diff --git a/lttng/lttng.c b/lttng/lttng.c index 7fbbcd68f..75cb1b473 100644 --- a/lttng/lttng.c +++ b/lttng/lttng.c @@ -32,8 +32,8 @@ #include -#include "lttng.h" #include "lttngerr.h" +#include "options.h" /* Variables */ static char *progname; @@ -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 */ @@ -642,8 +645,8 @@ static int check_ltt_sessiond(void) int ret; char *pathname = NULL, *alloc_pathname = NULL; - ret = lttng_check_session_daemon(); - if (ret < 0) { + ret = lttng_session_daemon_alive(); + if (ret == 0) { /* not alive */ /* Try command line option path */ if (opt_sessiond_path != NULL) { ret = access(opt_sessiond_path, F_OK | X_OK);