Fix: fail gracefully on --exclude on unsupported domains
[lttng-tools.git] / src / bin / lttng / commands / enable_events.c
index 0e4fdc61ed3e6391e0c5bde0c5a9c943c70fb91a..c13232a5aaf8fe14a2cf8a419e6c5e607f3e9c4e 100644 (file)
@@ -726,10 +726,22 @@ 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:
+               case LTTNG_DOMAIN_PYTHON:
+                       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.023816 seconds and 4 git commands to generate.