Add create session snapshot API in lttng-sessiond
[lttng-tools.git] / src / bin / lttng / commands / snapshot.c
index 866b55a38549c3e0cc41cc179a9b3b2ae4d089a2..0c15dbb70fa5f6b8f2adb8f314d9db4b4b773432 100644 (file)
@@ -343,11 +343,10 @@ static int record(const char *url)
        } else if (opt_ctrl_url) {
                MSG("Snapshot written to ctrl: %s, data: %s", opt_ctrl_url,
                                opt_data_url);
-       } else {
-               MSG("Snapshot written in session directory.");
        }
 
 error:
+       lttng_snapshot_output_destroy(output);
        return ret;
 }
 
@@ -460,6 +459,9 @@ int cmd_snapshot(int argc, const char **argv)
 
        ret = handle_command(poptGetArgs(pc));
        if (ret < 0) {
+               if (ret == -LTTNG_ERR_EPERM) {
+                       ERR("The session needs to be set in no output mode (--no-output)");
+               }
                ERR("%s", lttng_strerror(ret));
                goto end;
        }
This page took 0.023163 seconds and 4 git commands to generate.