From: Philippe Proulx Date: Fri, 28 Jul 2017 20:36:48 +0000 (-0400) Subject: lttng enable-channel: disallow --overwrite and --blocking-timeout X-Git-Tag: v2.11.0-rc1~456 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ea10baf2d584b3945c69747ce17b97d8644855a7;p=lttng-tools.git lttng enable-channel: disallow --overwrite and --blocking-timeout 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 --- 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);