X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=076aac54b1824659fc1ba88f195795084b334856;hb=97e190465f6a2a7d5bf72f445bb4d9d8544a0916;hp=12322837e7f681038e0ed6fe54d2ac72e035668d;hpb=ca2eb7f43cf00d12f563905d741a6789c3d130ee;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 12322837e..076aac54b 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -81,14 +81,10 @@ const char default_tracing_group[] = DEFAULT_TRACING_GROUP; const char default_ust_sock_dir[] = DEFAULT_UST_SOCK_DIR; const char default_global_apps_pipe[] = DEFAULT_GLOBAL_APPS_PIPE; -/* Variables */ -int opt_verbose; /* Not static for lttngerr.h */ -int opt_verbose_consumer; /* Not static for lttngerr.h */ -int opt_quiet; /* Not static for lttngerr.h */ - const char *progname; const char *opt_tracing_group; static int opt_sig_parent; +static int opt_verbose_consumer; static int opt_daemon; static int opt_no_kernel; static int is_root; /* Set to 1 if the daemon is running as root */ @@ -2850,7 +2846,8 @@ static int cmd_start_trace(struct ltt_session *session) usess = session->ust_session; if (session->enabled) { - ret = LTTCOMM_UST_START_FAIL; + /* Already started. */ + ret = LTTCOMM_TRACE_ALREADY_STARTED; goto error; } @@ -2942,7 +2939,7 @@ static int cmd_stop_trace(struct ltt_session *session) usess = session->ust_session; if (!session->enabled) { - ret = LTTCOMM_UST_STOP_FAIL; + ret = LTTCOMM_TRACE_ALREADY_STOPPED; goto error; } @@ -3988,11 +3985,11 @@ static int parse_args(int argc, char **argv) opt_no_kernel = 1; break; case 'q': - opt_quiet = 1; + lttng_opt_quiet = 1; break; case 'v': /* Verbose level can increase using multiple -v */ - opt_verbose += 1; + lttng_opt_verbose += 1; break; case 'Z': opt_verbose_consumer += 1;