*/
static void usage(FILE *ofp)
{
- fprintf(ofp, "usage: lttng disable-event NAME[,NAME2,...] (-k | -u) [OPTIONS]\n");
+ fprintf(ofp, "usage: lttng disable-event NAME[,NAME2,...] (-k | -u | -j | -l) [OPTIONS]\n");
fprintf(ofp, "\n");
fprintf(ofp, "Options:\n");
fprintf(ofp, " -h, --help Show this help\n");
fprintf(ofp, " -s, --session NAME Apply to session name\n");
fprintf(ofp, " -c, --channel NAME Apply to this channel\n");
fprintf(ofp, " -a, --all-events Disable all tracepoints\n");
- fprintf(ofp, " -k, --kernel Apply for the kernel tracer\n");
+ fprintf(ofp, " -k, --kernel Apply to the kernel tracer\n");
fprintf(ofp, " -u, --userspace Apply to the user-space tracer\n");
- fprintf(ofp, " -j, --jul Apply for Java application using JUL\n");
+ fprintf(ofp, " -j, --jul Apply to Java application using JUL\n");
fprintf(ofp, " -l, --log4j Apply to Java application using LOG4j\n");
fprintf(ofp, "\n");
fprintf(ofp, "Event options:\n");
} else if (opt_log4j) {
dom.type = LTTNG_DOMAIN_LOG4J;
} else {
- print_missing_domain();
- ret = CMD_ERROR;
- goto error;
+ /* Checked by the caller. */
+ assert(0);
}
channel_name = opt_channel_name;
}
}
+ ret = print_missing_or_multiple_domains(
+ opt_kernel + opt_userspace + opt_jul + opt_log4j);
+ 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");