Fix: error on no/multiple domain options
[lttng-tools.git] / src / bin / lttng / commands / disable_events.c
index 45e91a8bbfe7c3e5ec49b975a219187f002d2a15..7e84f798a57f746598a8723a02329b7bf13390f8 100644 (file)
@@ -185,9 +185,8 @@ static int disable_events(char *session_name)
        } else if (opt_python) {
                dom.type = LTTNG_DOMAIN_PYTHON;
        } else {
-               print_missing_domain();
-               ret = CMD_ERROR;
-               goto error;
+               /* Checked by the caller. */
+               assert(0);
        }
 
        channel_name = opt_channel_name;
@@ -377,6 +376,13 @@ int cmd_disable_events(int argc, const char **argv)
                }
        }
 
+       ret = print_missing_or_multiple_domains(
+               opt_kernel + opt_userspace + opt_jul + opt_log4j + opt_python);
+       if (ret) {
+               ret = CMD_ERROR;
+               goto end;
+       }
+
        opt_event_list = (char*) poptGetArg(pc);
        if (opt_event_list == NULL && opt_disable_all == 0) {
                ERR("Missing event name(s).\n");
This page took 0.023376 seconds and 4 git commands to generate.