X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsnapshot.c;h=b4124d51d5fc242631b062cffc7670552c75d696;hb=fae1e3cc12dd199269c581b683630d077e0ba266;hp=abdf1890198b1653a2a3a2ab0bc5bc0599d584aa;hpb=38b4ef1b199ddb15db78774a39e9c524ca7e2d24;p=lttng-tools.git diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index abdf18901..b4124d51d 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -725,6 +725,15 @@ int cmd_snapshot(int argc, const char **argv) break; case LTTNG_ERR_SNAPSHOT_NODATA: WARN("%s", lttng_strerror(command_ret)); + + /* A warning is fine since the user has no control on + * whether or not applications (or the kernel) have + * produced any event between the start of the tracing + * session and the recording of the snapshot. MI wise + * the command is not a success since nothing was + * recorded. + */ + command_ret = 0; break; default: ERR("%s", lttng_strerror(command_ret)); @@ -768,7 +777,7 @@ end: free(session_name); } - /* Overwrite ret if an error occured during handle_command */ + /* Overwrite ret if an error occurred during handle_command */ ret = command_ret ? command_ret : ret; poptFreeContext(pc); return ret;