projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng_set_event_filter() was returning bad error code
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
stop.c
diff --git
a/src/bin/lttng/commands/stop.c
b/src/bin/lttng/commands/stop.c
index fbabc510039f2f5fc8c5486b6240bf64d6326780..7c89e37e577af5af2f52ca2600795f0c9f1bd7d7 100644
(file)
--- a/
src/bin/lttng/commands/stop.c
+++ b/
src/bin/lttng/commands/stop.c
@@
-26,6
+26,8
@@
#include "../command.h"
#include "../command.h"
+#include <common/sessiond-comm/sessiond-comm.h>
+
static char *opt_session_name;
enum {
static char *opt_session_name;
enum {
@@
-45,11
+47,12
@@
static struct poptOption long_options[] = {
*/
static void usage(FILE *ofp)
{
*/
static void usage(FILE *ofp)
{
- fprintf(ofp, "usage: lttng stop [
options] [NAME
]\n");
+ fprintf(ofp, "usage: lttng stop [
NAME] [OPTIONS
]\n");
fprintf(ofp, "\n");
fprintf(ofp, "Where NAME is an optional session name. If not specified, lttng will\n");
fprintf(ofp, "get it from the configuration directory (.lttng).\n");
fprintf(ofp, "\n");
fprintf(ofp, "\n");
fprintf(ofp, "Where NAME is an optional session name. If not specified, lttng will\n");
fprintf(ofp, "get it from the configuration directory (.lttng).\n");
fprintf(ofp, "\n");
+ fprintf(ofp, "Options:\n");
fprintf(ofp, " -h, --help Show this help\n");
fprintf(ofp, " --list-options Simple listing of options\n");
fprintf(ofp, "\n");
fprintf(ofp, " -h, --help Show this help\n");
fprintf(ofp, " --list-options Simple listing of options\n");
fprintf(ofp, "\n");
@@
-75,7
+78,14
@@
static int stop_tracing(void)
ret = lttng_stop_tracing(session_name);
if (ret < 0) {
ret = lttng_stop_tracing(session_name);
if (ret < 0) {
- /* Don't set ret so lttng can interpret the sessiond error. */
+ switch (-ret) {
+ case LTTNG_ERR_TRACE_ALREADY_STOPPED:
+ WARN("Tracing already stopped for session %s", session_name);
+ break;
+ default:
+ ERR("%s", lttng_strerror(ret));
+ break;
+ }
goto free_name;
}
goto free_name;
}
This page took
0.035365 seconds
and
5
git commands to generate.