#include <lttng/lttng.h>
-#include "lttng.h"
#include "lttngerr.h"
+#include "options.h"
/* Variables */
static char *progname;
} 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 */
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);