projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve error handling of lttng cli
[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 689fe1b04998f8451d8c5018670ab5d1b25f1f65..f2ab453084f489cd38fe3cf2812a92278a05e296 100644
(file)
--- a/
src/bin/lttng/commands/stop.c
+++ b/
src/bin/lttng/commands/stop.c
@@
-61,7
+61,7
@@
static void usage(FILE *ofp)
*/
static int stop_tracing(void)
{
*/
static int stop_tracing(void)
{
- int ret
= CMD_SUCCESS
;
+ int ret;
char *session_name;
if (opt_session_name == NULL) {
char *session_name;
if (opt_session_name == NULL) {
@@
-76,9
+76,12
@@
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. */
goto free_name;
}
goto free_name;
}
+ ret = CMD_SUCCESS;
+
MSG("Tracing stopped for session %s", session_name);
free_name:
MSG("Tracing stopped for session %s", session_name);
free_name:
This page took
0.023812 seconds
and
4
git commands to generate.