From ea10baf2d584b3945c69747ce17b97d8644855a7 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 28 Jul 2017 16:36:48 -0400 Subject: [PATCH] lttng enable-channel: disallow --overwrite and --blocking-timeout MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The overwrite mode has no impact on LTTng-UST when there's a set blocking timeout. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/enable_channels.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 48c211095..cb9f44a63 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -652,6 +652,14 @@ int cmd_enable_channels(int argc, const char **argv) goto end; } + if (chan_opts.attr.overwrite == 1 && opt_blocking_timeout.set && + opt_blocking_timeout.value != 0) { + ERR("You cannot specify --overwrite and --blocking-timeout=N, " + "where N is different than 0"); + ret = CMD_ERROR; + goto end; + } + /* Mi check */ if (lttng_opt_mi) { writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi); -- 2.34.1