lttng enable-channel: disallow --overwrite and --blocking-timeout
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jul 2017 20:36:48 +0000 (16:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 1 Aug 2017 21:01:20 +0000 (17:01 -0400)
The overwrite mode has no impact on LTTng-UST when there's a set
blocking timeout.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/enable_channels.c

index 48c21109527cb6c28c9c242f817e5d4865fb4dcd..cb9f44a635531bbc5a0db04b77baee748faf6fac 100644 (file)
@@ -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);
This page took 0.026314 seconds and 4 git commands to generate.