X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsnapshot.c;h=94deb0cfa2eb0f06acd61cd68daf5efc9ac51874;hp=e973456b9c7786ff6abde3e9db7252759290f50d;hb=c3024823fbf2406ff4bcb2109e947c8b7142516e;hpb=6efe784e2cb20c6698205d5f408bfc173e1cdc57 diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index e973456b9..94deb0cfa 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -195,10 +195,11 @@ static int list_output(void) MSG("Snapshot output list for session %s", current_session_name); while ((s_iter = lttng_snapshot_output_list_get_next(list)) != NULL) { - MSG("%s[%" PRIu32 "] %s: %s", indent4, + MSG("%s[%" PRIu32 "] %s: %s (max-size: %" PRId64 ")", indent4, lttng_snapshot_output_get_id(s_iter), lttng_snapshot_output_get_name(s_iter), - lttng_snapshot_output_get_ctrl_url(s_iter)); + lttng_snapshot_output_get_ctrl_url(s_iter), + lttng_snapshot_output_get_maxsize(s_iter)); output_seen = 1; } @@ -492,10 +493,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; }