X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsnapshot.c;h=c704eee5f8582c791c8ba9831e7c7b9186975c26;hp=e973456b9c7786ff6abde3e9db7252759290f50d;hb=7badf927c6cd5d2e2ef217b905e45d5c3229ae79;hpb=b3bdb105e903c1800da1dbd45109397a07c43ed8 diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index e973456b9..c704eee5f 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -492,10 +492,17 @@ int cmd_snapshot(int argc, const char **argv) ret = handle_command(poptGetArgs(pc)); if (ret < 0) { - if (ret == -LTTNG_ERR_EPERM) { + switch (-ret) { + case LTTNG_ERR_EPERM: ERR("The session needs to be set in no output mode (--no-output)"); + break; + case LTTNG_ERR_SNAPSHOT_NODATA: + WARN("%s", lttng_strerror(ret)); + break; + default: + ERR("%s", lttng_strerror(ret)); + break; } - ERR("%s", lttng_strerror(ret)); goto end; }