Fix: fail gracefully on --exclude on unsupported domains
[lttng-tools.git] / src / bin / lttng / commands / enable_events.c
index 7b0e19545e8e8b2dbf354efcac02327ecafb55c9..50734c05906084778001c190a85e7d18a729e6cb 100644 (file)
@@ -681,10 +681,21 @@ static int enable_events(char *session_name)
                goto error;
        }
 
-       if (opt_kernel && opt_exclude) {
-               ERR("Event name exclusions are not yet implemented for kernel events");
-               ret = CMD_ERROR;
-               goto error;
+       if (opt_exclude) {
+               switch (dom.type) {
+               case LTTNG_DOMAIN_KERNEL:
+               case LTTNG_DOMAIN_JUL:
+               case LTTNG_DOMAIN_LOG4J:
+                       ERR("Event name exclusions are not yet implemented for %s events",
+                                       get_domain_str(dom.type));
+                       ret = CMD_ERROR;
+                       goto error;
+               case LTTNG_DOMAIN_UST:
+                       /* Exclusions supported */
+                       break;
+               default:
+                       assert(0);
+               }
        }
 
        channel_name = opt_channel_name;
This page took 0.023686 seconds and 4 git commands to generate.